This repository was archived by the owner on Dec 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -647,8 +647,10 @@ def sort_values(
647647 The ideal number of output partitions. If None, use the same as the
648648 input. If ‘auto’ then decide by memory use. Not used when sorting
649649 nested layers.
650- ascending: bool, optional
651- Sort ascending vs. descending. Defaults to True.
650+ ascending: bool or list[bool], optional
651+ Sort ascending vs. descending. Defaults to True. Specify list for
652+ multiple sort orders. If this is a list of bools, must match the
653+ length of the by.
652654 na_position: {‘last’, ‘first’}, optional
653655 Puts NaNs at the beginning if ‘first’, puts NaN at the end if
654656 ‘last’. Defaults to ‘last’.
Original file line number Diff line number Diff line change @@ -308,8 +308,8 @@ def test_sort_values(test_dataset):
308308
309309 # test sorting on nested columns
310310 sorted_nested = test_dataset .sort_values (by = "nested.flux" , ascending = False )
311- assert sorted_nested .compute ().loc [0 ]["nested" ]["flux" ].values .tolist () == sorted (
312- test_dataset .loc [0 ]["nested. flux" ].values . compute () .tolist (),
311+ assert sorted_nested .compute ().iloc [0 ]["nested" ]["flux" ].values .tolist () == sorted (
312+ test_dataset .compute (). iloc [0 ]["nested" ][ " flux" ].values .tolist (),
313313 reverse = True ,
314314 )
315315 assert sorted_nested .known_divisions # Divisions should be known
You can’t perform that action at this time.
0 commit comments