Skip to content

Commit 5b1a92d

Browse files
jbrockmendelyeshsurya
authored andcommitted
CLN: remove CategoricalIndex.unique (pandas-dev#40995)
1 parent 23c9bf9 commit 5b1a92d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pandas/core/indexes/category.py

-9
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,6 @@ def fillna(self, value, downcast=None):
369369

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

372-
@doc(Index.unique)
373-
def unique(self, level=None):
374-
if level is not None:
375-
self._validate_index_level(level)
376-
result = self._values.unique()
377-
# Use _simple_new instead of _shallow_copy to ensure we keep dtype
378-
# of result, not self.
379-
return type(self)._simple_new(result, name=self.name)
380-
381372
def reindex(
382373
self, target, method=None, level=None, limit=None, tolerance=None
383374
) -> tuple[Index, np.ndarray | None]:

0 commit comments

Comments
 (0)