Skip to content

Commit 2ab8e30

Browse files
committed
PERF: Delete flag for sorting multiindex loc call.
1 parent 1717a14 commit 2ab8e30

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pandas/core/indexes/multi.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3103,21 +3103,6 @@ def _reorder_indexer(
31033103
-------
31043104
indexer : a sorted Int64Index indexer of self ordered as seq
31053105
"""
3106-
# If the index is lexsorted and the list_like label in seq are sorted
3107-
# then we do not need to sort
3108-
if self.is_lexsorted():
3109-
need_sort = False
3110-
for i, k in enumerate(seq):
3111-
if is_list_like(k):
3112-
if not need_sort:
3113-
k_codes = self.levels[i].get_indexer(k)
3114-
k_codes = k_codes[k_codes >= 0] # Filter absent keys
3115-
# True if the given codes are not ordered
3116-
need_sort = (k_codes[:-1] > k_codes[1:]).any()
3117-
# Bail out if both index and seq are sorted
3118-
if not need_sort:
3119-
return indexer
3120-
31213106
n = len(self)
31223107
keys: Tuple[np.ndarray, ...] = tuple()
31233108
# For each level of the sequence in seq, map the level codes with the

0 commit comments

Comments
 (0)