Skip to content

Commit

Permalink
make first value b
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Jul 9, 2024
1 parent 103b542 commit 90e6915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/nested_pandas/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_count_nested(join):
data={
"c": [0, 2, 4, 1, np.nan, 3, 1, 4, 1],
"d": [5, 4, 7, 5, 3, 1, 9, 3, 4],
"label": ["a", "a", "b", "b", "a", "a", "b", "a", "b"],
"label": ["b", "a", "b", "b", "a", "a", "b", "a", "b"],
},
index=[0, 0, 0, 1, 1, 1, 2, 2, 2],
)
Expand All @@ -28,8 +28,8 @@ def test_count_nested(join):
# Test count by
label_counts = count_nested(base, "nested", by="label", join=join)

assert all(label_counts["n_nested_a"].values == [2, 2, 1])
assert all(label_counts["n_nested_b"].values == [1, 1, 2])
assert all(label_counts["n_nested_a"].values == [1, 2, 1])
assert all(label_counts["n_nested_b"].values == [2, 1, 2])

# Make sure the ordering is alphabetical
# https://github.com/lincc-frameworks/nested-pandas/issues/109
Expand Down

0 comments on commit 90e6915

Please sign in to comment.