-
Notifications
You must be signed in to change notification settings - Fork 915
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
Support IntervalDtype in cudf.from_pandas #16014
Support IntervalDtype in cudf.from_pandas #16014
Conversation
…ndas/intervaldtype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking nit
python/cudf/cudf/core/dataframe.py
Outdated
@@ -8072,6 +8072,8 @@ def from_pandas(obj, nan_as_null=no_default): | |||
return cudf.Index.from_pandas(obj, nan_as_null=nan_as_null) | |||
elif isinstance(obj, pd.CategoricalDtype): | |||
return cudf.CategoricalDtype.from_pandas(obj) | |||
elif isinstance(obj, pd.IntervalDtype): | |||
return cudf.IntervalDtype.from_pandas(obj) | |||
else: | |||
raise TypeError( | |||
"from_pandas only accepts Pandas Dataframes, Series, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this error string is increasingly out of date (it doesn't mention categoricaldtype and now intervaldtype). Should we reword the be less specific?
f"from_pandas unsupported for object of type {type(obj)}
"
perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Changed to this
/merge |
Description
Noticed while running the pandas test suite against
cudf.pandas
Checklist