diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 863465ca1565c..af66bb54610f1 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6890,7 +6890,8 @@ def sort_values( builtin :meth:`sorted` function, with the notable difference that this `key` function should be *vectorized*. It should expect a ``Series`` and return a Series with the same shape as the input. - It will be applied to each column in `by` independently. + It will be applied to each column in `by` independently. The values in the + returned Series will be used as the keys for sorting. Returns ------- diff --git a/pandas/core/generic.py b/pandas/core/generic.py index de7fb3682fb4f..e0a4f9d9c546a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -4884,7 +4884,8 @@ def sort_values( builtin :meth:`sorted` function, with the notable difference that this `key` function should be *vectorized*. It should expect a ``Series`` and return a Series with the same shape as the input. - It will be applied to each column in `by` independently. + It will be applied to each column in `by` independently. The values in the + returned Series will be used as the keys for sorting. Returns -------