We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 034f784 commit 20fae22Copy full SHA for 20fae22
pandas/core/indexes/multi.py
@@ -1403,7 +1403,7 @@ def is_monotonic_increasing(self) -> bool:
1403
return if the index is monotonic increasing (only equal or
1404
increasing) values.
1405
"""
1406
- if all(self.get_level_values(i).is_monotonic for i in range(self.nlevels)):
+ if all(x.is_monotonic for x in self.levels):
1407
# If each level is sorted, we can operate on the codes directly. GH27495
1408
return libalgos.is_lexsorted(
1409
[x.astype("int64", copy=False) for x in self.codes]
0 commit comments