Skip to content

Commit 131a7c3

Browse files
committed
PERF: remove useless overrides
closes pandas-dev#21522
1 parent 9e982e1 commit 131a7c3

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

doc/source/whatsnew/v0.23.2.txt

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Performance Improvements
2727
- Improved performance of membership checks in :class:`CategoricalIndex`
2828
(i.e. ``x in ci``-style checks are much faster). :meth:`CategoricalIndex.contains`
2929
is likewise much faster (:issue:`21369`)
30+
- Improved performance of :meth:`MultiIndex.is_unique` (:issue:`21522`)
3031
-
3132

3233
Documentation Changes

pandas/core/indexes/multi.py

-12
Original file line numberDiff line numberDiff line change
@@ -852,14 +852,6 @@ def _has_complex_internals(self):
852852
# to disable groupby tricks
853853
return True
854854

855-
@cache_readonly
856-
def is_monotonic(self):
857-
"""
858-
return if the index is monotonic increasing (only equal or
859-
increasing) values.
860-
"""
861-
return self.is_monotonic_increasing
862-
863855
@cache_readonly
864856
def is_monotonic_increasing(self):
865857
"""
@@ -887,10 +879,6 @@ def is_monotonic_decreasing(self):
887879
# monotonic decreasing if and only if reverse is monotonic increasing
888880
return self[::-1].is_monotonic_increasing
889881

890-
@cache_readonly
891-
def is_unique(self):
892-
return not self.duplicated().any()
893-
894882
@cache_readonly
895883
def _have_mixed_levels(self):
896884
""" return a boolean list indicated if we have mixed levels """

0 commit comments

Comments
 (0)