Skip to content

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

Merged
merged 6 commits into from
Jul 31, 2021

Conversation

phofl
Copy link
Member

@phofl phofl commented Jul 29, 2021

@phofl phofl added MultiIndex Regression Functionality that used to work in a prior pandas version labels Jul 29, 2021
@phofl phofl added this to the 1.3.2 milestone Jul 29, 2021
@jreback
Copy link
Contributor

jreback commented Jul 29, 2021

lgtm. @jbrockmendel ok here?

isinstance(axis, MultiIndex)
and labels.dtype == "object"
and not is_tuple_labels
):
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jreback jreback merged commit d4eb667 into pandas-dev:master Jul 31, 2021
@jreback
Copy link
Contributor

jreback commented Jul 31, 2021

thanks @phofl

@jreback
Copy link
Contributor

jreback commented Jul 31, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jul 31, 2021

Something went wrong ... Please have a look at my logs.

phofl added a commit that referenced this pull request Jul 31, 2021
@phofl phofl deleted the 42771 branch July 31, 2021 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.drop() can't drop row by index tuple when MultiIndex has duplicated value in a level.
3 participants