Skip to content

Commit

Permalink
CLN: remove CategoricalIndex.unique (#40995)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Apr 19, 2021
1 parent 69f225a commit 5525561
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pandas/core/indexes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,6 @@ def fillna(self, value, downcast=None):

return type(self)._simple_new(cat, name=self.name)

@doc(Index.unique)
def unique(self, level=None):
if level is not None:
self._validate_index_level(level)
result = self._values.unique()
# Use _simple_new instead of _shallow_copy to ensure we keep dtype
# of result, not self.
return type(self)._simple_new(result, name=self.name)

def reindex(
self, target, method=None, level=None, limit=None, tolerance=None
) -> tuple[Index, np.ndarray | None]:
Expand Down

0 comments on commit 5525561

Please sign in to comment.