-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Preserve key order when using loc on MultiIndex DataFrame #28933
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
Merged
jreback
merged 20 commits into
pandas-dev:master
from
nrebena:multiindex_sort_loc_order_issue_22797
Feb 2, 2020
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2753c79
TST: Test for issue #22797
nrebena af5c678
BUG: sort MultiIndex DataFrame loc result
nrebena dd53a91
PERF: Skip sort of MultiIndex DataFrame loc result if not needed
nrebena 97b952d
CLN: Some code simplification
nrebena 3fa3c6d
CLN: Move code into separate function
nrebena 8b5ec48
CLN: More typing and linting
nrebena fb33627
CLN: Improve readability and doc
nrebena 2c6195f
DOC: Add a whatsnew
nrebena d911110
CLN: More typing for _reorder_indexer
nrebena 81edea5
TST: Add more test cases to test_multiindex_loc_order
nrebena f1407f1
TST: move test_multiindex_loc_order to tests/test_multilevel.py
nrebena 4c667a7
CLN: Move need_sort test in _reorder_indexer
nrebena ee89a33
TST: Test also for columns
nrebena c18d60d
FIX: Test need sort only work on lexsorted indexes
nrebena 1717a14
Minor change in how to determined if sorting is needed
nrebena 2ab8e30
PERF: Delete flag for sorting multiindex loc call.
nrebena edde717
TST: Parametrize tests
nrebena 82e5109
DOC: Move whatsnew entry from v1.0.0 to v1.1.0
nrebena 3367109
Revert "PERF: Delete flag for sorting multiindex loc call."
nrebena 025d304
DOC: Add mini example to whatsnew
nrebena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can you make a mini-example (separate sub-section). I think this is very hard to visualize from the text, but the basic example we are using is very clear.
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.
Sure thing.