-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG/PERF: use lexsort_indexer in MultiIndex.argsort #48495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
5338e66
bd50149
911ded0
87eb8e3
8d3fdad
2d82897
68c0481
adb0e8b
7de6268
80047dc
d4916a4
fa395d3
45174b5
ef974f3
bfa759f
28cbf70
3523724
528b344
c853eb5
d036275
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,3 +280,12 @@ def test_remove_unused_levels_with_nan(): | |
result = idx.levels | ||
expected = FrozenList([["a", np.nan], [4]]) | ||
assert str(result) == str(expected) | ||
|
||
|
||
def test_sort_values_nan(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add gh refs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added refs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other tests as well please |
||
midx = MultiIndex(levels=[["A", "B", "C"], ["D"]], codes=[[1, 0, 2], [-1, -1, 0]]) | ||
result = midx.sort_values() | ||
expected = MultiIndex( | ||
levels=[["A", "B", "C"], ["D"]], codes=[[0, 1, 2], [-1, -1, 0]] | ||
) | ||
tm.assert_index_equal(result, expected) |
Uh oh!
There was an error while loading. Please reload this page.