Skip to content

Commit

Permalink
coerce Pandas categories into a column
Browse files Browse the repository at this point in the history
  • Loading branch information
shwina committed Nov 30, 2022
1 parent c93caaa commit 710c6f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ def as_categorical_column(self, dtype, **kwargs) -> ColumnBase:
isinstance(dtype, pd.CategoricalDtype)
and dtype.categories is not None
):
labels = self._label_encoding(cats=dtype.categories._column)
labels = self._label_encoding(cats=as_column(dtype.categories))
if "ordered" in kwargs:
warnings.warn(
"Ignoring the `ordered` parameter passed in `**kwargs`, "
Expand Down

0 comments on commit 710c6f6

Please sign in to comment.