Series.sort_values using mergesort and descending is not stable #28697
Labels
Algos
Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
Code Sample
Output
Expected Output
Problem description
Mergesort should be stable irrespective of direction, but
ascending=False
(which is not stable) is just the reverse ofascending=True
(which is stable).The text was updated successfully, but these errors were encountered: