Skip to content

Regression: Series.loc.setitem raising with all false indexer and series on rhs #45784

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 1 commit into from
Feb 3, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Feb 2, 2022

This is really annoying. We are treating setting to a Series with all False indexer differently than to a DataFrame. Series raises, DataFrame not. Series does not raise, when rhs is a Series itself (only case as far as I can see). We should think about cleaning that up.

@phofl phofl added this to the 1.4.1 milestone Feb 2, 2022
@phofl phofl added Indexing Related to indexing on series/frames, not to indexes themselves Regression Functionality that used to work in a prior pandas version labels Feb 2, 2022
@jreback jreback merged commit aafd4c8 into pandas-dev:main Feb 3, 2022
@jreback
Copy link
Contributor

jreback commented Feb 3, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app

This comment was marked as resolved.

@jreback
Copy link
Contributor

jreback commented Feb 3, 2022

thanks @phofl

certainly let's open an issue about consistent indexing here with boolean indexers (and PR if you can :->)

@lumberbot-app

This comment was marked as resolved.

@simonjayhawkins
Copy link
Member

merge conflict due to #45403

jreback pushed a commit that referenced this pull request Feb 7, 2022
…alse indexer and series on rhs (#45859)

Co-authored-by: Patrick Hoefler <[email protected]>
phofl added a commit to phofl/pandas that referenced this pull request Feb 14, 2022
@phofl phofl deleted the 45778 branch February 14, 2022 10:22
@phofl
Copy link
Member Author

phofl commented Feb 14, 2022

I think the behavior I mentioned above was aligned in #45501 (not 100% sure if that was the cause, but it is consistent now)

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves 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: setting with loc breaks in 1.4.0 when indexing using an all-False boolean series
3 participants