Skip to content

Commit 6f89c68

Browse files
author
Jonathan Tammo Siebert
committed
DOC: Clarify that DataFrame.sort_values is stable for len(by)>1
1 parent 639a9c2 commit 6f89c68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/generic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4367,9 +4367,9 @@ def sort_values(
43674367
If True, perform operation in-place.
43684368
kind : {'quicksort', 'mergesort', 'heapsort'}, default 'quicksort'
43694369
Choice of sorting algorithm. See also ndarray.np.sort for more
4370-
information. `mergesort` is the only stable algorithm. For
4371-
DataFrames, this option is only applied when sorting on a single
4372-
column or label.
4370+
information. `mergesort` is the only stable algorithm. For
4371+
DataFrames, if sorting by multiple columns or labels, this
4372+
argument is ignored, defaulting to a stable sorting algorithm.
43734373
na_position : {'first', 'last'}, default 'last'
43744374
Puts NaNs at the beginning if `first`; `last` puts NaNs at the
43754375
end.

0 commit comments

Comments
 (0)