-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame.drop silently does nothing if MultiIndex has duplicates #42801
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
Conversation
phofl
commented
Jul 29, 2021
- closes BUG: DataFrame.drop() can't drop row by index tuple when MultiIndex has duplicated value in a level. #42771
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
lgtm. @jbrockmendel ok here? |
isinstance(axis, MultiIndex) | ||
and labels.dtype == "object" | ||
and not is_tuple_labels | ||
): |
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 add a comment below this pointing back to the PR/issue
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.
Done
thanks @phofl |
@meeseeksdev backport 1.3.x |
… MultiIndex has duplicates
Something went wrong ... Please have a look at my logs. |
…x has duplicates (#42829) Co-authored-by: Patrick Hoefler <[email protected]>