-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: Fix regression when grouping over a Series #57323
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
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.
Looks good!
ref = weakref.ref(self.blocks[blkno]) | ||
return ref in mgr.blocks[blkno].refs.referenced_blocks | ||
blk = self.blocks[blkno] | ||
return any(blk is ref() for ref in mgr.blocks[blkno].refs.referenced_blocks) |
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.
At the point where df["col"].index is df.index
is no longer true, we will have to update this, but I assume we can handle that at that point
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.
That should work anyway though, since df.col.index will also be in the references since it still shares values with df.index. All shallow copies of the original values should be in there, that’s the elegant think about the tracking mechanism
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.
Actually index checks will never get there since it's defined on the manager
…g over a Series) (#57339) Backport PR #57323: REGR: Fix regression when grouping over a Series Co-authored-by: Patrick Hoefler <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.