Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

Commit b27a5f5

Browse files
committed
fix unit tests
1 parent dcf4746 commit b27a5f5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/nested_dask/core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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’.

tests/nested_dask/test_nestedframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)