Skip to content

Commit 0f23615

Browse files
committed
Whatsnew entry for DataFrame.sort_values by index (10806)
1 parent 970e25b commit 0f23615

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/source/whatsnew/v0.19.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ Other enhancements
229229
- ``pd.read_html()`` has gained support for the ``decimal`` option (:issue:`12907`)
230230
- A top-level function :func:`union_categorical` has been added for combining categoricals, see :ref:`Unioning Categoricals<categorical.union>` (:issue:`13361`)
231231
- ``Series`` has gained the properties ``.is_monotonic``, ``.is_monotonic_increasing``, ``.is_monotonic_decreasing``, similar to ``Index`` (:issue:`13336`)
232+
- ``DataFrame.sort_values()`` has gained support for re-ordering columns by index label (:issue:`10806`)
232233

233234
.. _whatsnew_0190.api:
234235

pandas/tests/frame/test_sorting.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ def test_sort_values(self):
129129
expected = frame.reindex(columns=['B', 'A', 'C'])
130130
assert_frame_equal(sorted_df, expected)
131131

132-
sorted_df = frame.sort_values(by=[1, 3], axis=1, ascending=[True, False])
132+
sorted_df = frame.sort_values(by=[1, 3], axis=1,
133+
ascending=[True, False])
133134
assert_frame_equal(sorted_df, expected)
134135

135136
sorted_df = frame.sort_values(by=[1, 3], axis=1, ascending=False)

0 commit comments

Comments
 (0)