Skip to content

Commit 7cab3bb

Browse files
committed
BUG: try removing TypeError handling from nargsort for np_dev
1 parent 182643d commit 7cab3bb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pandas/core/sorting.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,7 @@ def nargsort(
310310
if not ascending:
311311
non_nans = non_nans[::-1]
312312
non_nan_idx = non_nan_idx[::-1]
313-
try:
314-
indexer = non_nan_idx[non_nans.argsort(kind=kind)]
315-
except TypeError:
316-
# For compatibility with Series: fall back to quicksort
317-
# when mergesort is unavailable for object element type
318-
indexer = non_nan_idx[non_nans.argsort(kind="quicksort")]
313+
indexer = non_nan_idx[non_nans.argsort(kind=kind)]
319314

320315
if not ascending:
321316
indexer = indexer[::-1]

0 commit comments

Comments
 (0)