Skip to content

Commit 546b9fa

Browse files
committed
use nargsort with indices: Period, DateTime, TimeDelta
1 parent 7332255 commit 546b9fa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/indexes/base.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4510,9 +4510,7 @@ def sort_values(
45104510

45114511
# GH 35584. Sort missing values according to na_position kwarg
45124512
# ignore na_position for MultiIndex
4513-
if not isinstance(
4514-
self, (ABCMultiIndex, ABCDatetimeIndex, ABCTimedeltaIndex, ABCPeriodIndex)
4515-
):
4513+
if not isinstance(self, ABCMultiIndex):
45164514
_as = nargsort(
45174515
items=idx, ascending=ascending, na_position=na_position, key=key
45184516
)

0 commit comments

Comments
 (0)