Skip to content

Commit 8db09d0

Browse files
updated whatsnew
1 parent 364cc5e commit 8db09d0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/source/whatsnew/v1.1.0.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Note how this is sorted with capital letters first. If we apply the `ser.str.low
5858

5959
.. ipython:: python
6060
61-
s.sort_values(key=lambda x: x.str.lower())
61+
s.sort_values(key=lambda x : x.str.lower)
6262
6363
6464
When applied to a `DataFrame`, they key is applied per-column to all columns or a subset if
@@ -68,13 +68,11 @@ When applied to a `DataFrame`, they key is applied per-column to all columns or
6868
6969
df = pd.DataFrame({'a': ['C', 'C', 'a', 'a', 'B', 'B'],
7070
'b': [1, 2, 3, 4, 5, 6]})
71-
df.sort_values(by=['a', 'b'], key=lambda col: col.str.lower()
72-
if col.name == 'a' else -col)
71+
df.sort_values(by=['a'], key=lambda col: col.str.lower())
7372
7473
75-
For :meth:`DataFrame.sort_index` with `MultiIndex`, the key function is applied per level. For
76-
more details, see examples and documentation in :meth:`DataFrame.sort_values`, :meth:`Series.sort_values`,
77-
and :meth:`~DataFrame.sort_index`.
74+
For more details, see examples and documentation in :meth:`DataFrame.sort_values`,
75+
:meth:`Series.sort_values`, and :meth:`~DataFrame.sort_index`.
7876

7977
.. _whatsnew_110.timestamp_fold_support:
8078

0 commit comments

Comments
 (0)