Skip to content

Commit 716820e

Browse files
committed
DOC: Add docstring to MultiIndex._lexsort_depth
1 parent 2530335 commit 716820e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/core/indexes/multi.py

+8
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,14 @@ def lexsort_depth(self):
17971797
return self._lexsort_depth()
17981798

17991799
def _lexsort_depth(self):
1800+
"""
1801+
Compute and return the lexsort_depth, the number of levels of the
1802+
MultiIndex that are sorted lexically
1803+
1804+
Returns
1805+
------
1806+
int
1807+
"""
18001808
int64_codes = [ensure_int64(level_codes) for level_codes in self.codes]
18011809
for k in range(self.nlevels, 0, -1):
18021810
if libalgos.is_lexsorted(int64_codes[:k]):

0 commit comments

Comments
 (0)