-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Multiindex sort docs #13112
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
DOC: Multiindex sort docs #13112
Conversation
On higher dimensional objects, you can sort any of the other axes by level if | ||
they have a MultiIndex: | ||
Some indexing will work even if the data are not sorted, but will be rather | ||
inefficient (and raises a ``PerformanceWarning``). It will will also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 will
shows a warning (not raises)
@jreback updated |
change around a little bit. thanks for the PR! |
Traceback (most recent call last) | ||
... | ||
KeyError: Key length (3) was greater than MultiIndex lexsort depth (2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this is removed? I think it is still a nice example of what happens if the index is not sorted? (this error still occurs on master)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it back (in the context of the slightly changed example). lmk if more clear.
cc @MaximilianR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closes #13108