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

[REVIEW] Don't identify decimals as strings. #7710

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion python/cudf/cudf/utils/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ def is_numerical_dtype(obj):


def is_string_dtype(obj):
return pd.api.types.is_string_dtype(obj) and not is_categorical_dtype(obj)
return (
pd.api.types.is_string_dtype(obj)
# Reject all cudf extension types.
and not is_categorical_dtype(obj)
and not is_decimal_dtype(obj)
and not is_list_dtype(obj)
and not is_struct_dtype(obj)
and not is_interval_dtype(obj)
)


def is_datetime_dtype(obj):
Expand Down