Skip to content

Commit 485949e

Browse files
Removing optimization to be moved into nargsort
1 parent 5cade34 commit 485949e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pandas/core/series.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,13 +1788,6 @@ def sort_index(self, axis=0, level=None, ascending=True, inplace=False,
17881788
else:
17891789
from pandas.core.groupby import _nargsort
17901790

1791-
if ((ascending and index.is_monotonic_increasing) or
1792-
(not ascending and index.is_monotonic_decreasing)):
1793-
if inplace:
1794-
return
1795-
else:
1796-
return self.copy()
1797-
17981791
indexer = _nargsort(index, kind=kind, ascending=ascending,
17991792
na_position=na_position)
18001793
new_index = index.take(indexer)

0 commit comments

Comments
 (0)