Skip to content

Commit 31704e3

Browse files
authored
DOC: Add line clarifying sorting using sort_values() (#60734)
fix docs
1 parent 42bf375 commit 31704e3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/core/frame.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6890,7 +6890,8 @@ def sort_values(
68906890
builtin :meth:`sorted` function, with the notable difference that
68916891
this `key` function should be *vectorized*. It should expect a
68926892
``Series`` and return a Series with the same shape as the input.
6893-
It will be applied to each column in `by` independently.
6893+
It will be applied to each column in `by` independently. The values in the
6894+
returned Series will be used as the keys for sorting.
68946895
68956896
Returns
68966897
-------

pandas/core/generic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4884,7 +4884,8 @@ def sort_values(
48844884
builtin :meth:`sorted` function, with the notable difference that
48854885
this `key` function should be *vectorized*. It should expect a
48864886
``Series`` and return a Series with the same shape as the input.
4887-
It will be applied to each column in `by` independently.
4887+
It will be applied to each column in `by` independently. The values in the
4888+
returned Series will be used as the keys for sorting.
48884889
48894890
Returns
48904891
-------

0 commit comments

Comments
 (0)