Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to add categories to a categorical column #113

Closed
kkraus14 opened this issue Mar 6, 2018 · 1 comment
Closed

Function to add categories to a categorical column #113

kkraus14 opened this issue Mar 6, 2018 · 1 comment
Labels
0 - Backlog In queue waiting for assignment feature request New feature or request Python Affects Python cuDF API.

Comments

@kkraus14
Copy link
Collaborator

kkraus14 commented Mar 6, 2018

Right now there is no way to add categories to a categorical column without defining a new column. This would be useful for UDFs, fillna, etc. where a user may want to split a categorical column based on another column or fill in nulls.

Example:

import pandas as pd
from pygdf.dataframe import DataFrame

pdf = pd.DataFrame({"cat_key": ["a", "b", None, "c", None], "value": [1, 2, 3, 4, 5]})
pdf['cat_key'] = pdf['cat_key'].astype("category")

gdf = DataFrame.from_pandas(pdf)

In the above the only thing we can fillna to is "a", "b", or "c". There should be an add_categories function similar to pandas.Series.cat.add_categories.

@mike-wendt mike-wendt added feature request New feature or request 0 - Backlog In queue waiting for assignment labels Aug 6, 2018
@mike-wendt mike-wendt changed the title Function to add categories to a categorical column Function to add categories to a categorical column Aug 8, 2018
mike-wendt pushed a commit that referenced this issue Oct 26, 2018
[REVIEW] FIX Update Travis CI Script to Update apt Before libboost Install
@kkraus14 kkraus14 added the Python Affects Python cuDF API. label Dec 12, 2018
@mike-wendt mike-wendt added this to Needs triage in Feature Planning Dec 14, 2018
@mike-wendt mike-wendt moved this from Needs prioritizing to Future release in Feature Planning Feb 19, 2019
@kkraus14
Copy link
Collaborator Author

This functionality now exists as of 0.14. Closing.

Feature Planning automation moved this from Future release to Closed May 29, 2020
raydouglass pushed a commit that referenced this issue Nov 7, 2023
After rapidsai/cudf-private#91 has been merged. There have been a handful dask-cudf pytest failures, this PR resolves those failures.

Failures linked here: [allout.txt](https://github.com/rapidsai/cudf-private/files/13079556/allout.txt)

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

URL: rapidsai/cudf-private#113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment feature request New feature or request Python Affects Python cuDF API.
Projects
No open projects
Development

No branches or pull requests

2 participants