Skip to content

BUG: KeyError when a series popped from data frame with bool indexer #42644

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 5 commits into from
Jul 26, 2021

Conversation

debnathshoham
Copy link
Member

@debnathshoham debnathshoham commented Jul 21, 2021

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Small comments, please add whatsnew

@debnathshoham debnathshoham requested a review from phofl July 25, 2021 12:15
@@ -1234,7 +1234,7 @@ def _maybe_update_cacher(
if ref is None:
del self._cacher
else:
if len(self) == len(ref):
if len(self) == len(ref) and self.name in ref.columns: # GH#42530
Copy link
Contributor

Choose a reason for hiding this comment

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

don't put the comment after the line, makes this very hard to read. you can add in the if block with an explanation.

would be ok making this an if/elif/else block

@jreback jreback added this to the 1.4 milestone Jul 25, 2021
@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves labels Jul 25, 2021
@jreback jreback merged commit 28ea152 into pandas-dev:master Jul 26, 2021
@jreback
Copy link
Contributor

jreback commented Jul 26, 2021

thanks @debnathshoham

@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.3.x

@lumberbot-app

This comment has been minimized.

@jreback
Copy link
Contributor

jreback commented Jul 26, 2021

@simonjayhawkins you are right, the release note is in the wrong place.

@simonjayhawkins
Copy link
Member

just doing the backport now with the release note in 1.3.2. and then a separate PR to move the release note (which won't need a backport, unless we get conflicts in the meantime and I need to resync)

simonjayhawkins added a commit that referenced this pull request Jul 26, 2021
sthagen added a commit to sthagen/pandas-dev-pandas that referenced this pull request Jul 26, 2021
CGe0516 pushed a commit to CGe0516/pandas that referenced this pull request Jul 29, 2021
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: KeyError when assigning to Series values after pop from DataFrame
4 participants