We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 182643d commit 7cab3bbCopy full SHA for 7cab3bb
pandas/core/sorting.py
@@ -310,12 +310,7 @@ def nargsort(
310
if not ascending:
311
non_nans = non_nans[::-1]
312
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")]
+ indexer = non_nan_idx[non_nans.argsort(kind=kind)]
319
320
321
indexer = indexer[::-1]
0 commit comments