Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Jan 25, 2025
1 parent 31f9e99 commit 72ba73f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,6 @@ def cast(self, dtype: Dtype) -> ColumnBase:
return result

def astype(self, dtype: Dtype, copy: bool = False) -> ColumnBase:
# import pdb;pdb.set_trace()
if len(self) == 0:
dtype = cudf.dtype(dtype)
if self.dtype == dtype:
Expand Down Expand Up @@ -1252,7 +1251,7 @@ def as_categorical_column(self, dtype) -> ColumnBase:
)

# Categories must be unique and sorted in ascending order.
cats = self.unique().sort_values() # .astype(self.dtype)
cats = self.unique().sort_values()
label_dtype = min_unsigned_type(len(cats))
labels = self._label_encoding(
cats=cats, dtype=label_dtype, na_sentinel=cudf.Scalar(1)
Expand Down
2 changes: 2 additions & 0 deletions python/cudf/cudf/pandas/_wrappers/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def custom_repr_html(obj):


def _Series_dtype(self):
# Fast-path to extract dtype from the current
# object without round-tripping through the slow<->fast
return self._fsproxy_wrapped.dtype


Expand Down

0 comments on commit 72ba73f

Please sign in to comment.