-
Notifications
You must be signed in to change notification settings - Fork 916
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
Allow for strings for comparison in UDFs / fillna for categorical columns #111
Comments
Updating the ex code shown above and running it in cudf 0.15:
The above code produces the following error:
Furthermore, using :
Throws the following error:
|
We've implemented fillna for categorical columns. import cudf
import pandas as pd
s = cudf.Series(["a","b",None,"b"]).astype("category")
s.fillna("a")
0 a
1 b
2 a
3 b
dtype: category
Categories (2, object): ['a', 'b'] If the remaining request here boils down to supporting string types in UDFs, perhaps we might want to close this issue (as it's covered by others, possibly #9639)? |
Thanks Nick, I agree. Let's close in favor of #9639 |
If using a categorical column and you try to use
.query()
or.fillna()
you need to use the categorical code rather than the value of the categorical.Example:
These work by giving the index of
null_key
ingdf['key'].cat.categories
:These do not work and fail with "Failed at nopython (nopython frontend)". I assume this is due to numba being unable to compile the function with a string type?
The text was updated successfully, but these errors were encountered: