Skip to content

BUG: Grouper specified by key not regarded as in-axis #50414

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 2 commits into from
Dec 28, 2022

Conversation

rhshadrach
Copy link
Member

Found this working on #46944. It was a case where we add to exclusions but consider the grouping as not in-axis. This creates a subtle difference in _obj_with_exclusions vs _selected_obj.

@rhshadrach rhshadrach added this to the 2.0 milestone Dec 23, 2022
if (
grp.groupings is None
or self.obj.ndim == 1
or self._group_selection is not None
):
Copy link
Member Author

Choose a reason for hiding this comment

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

This leaked into here, but I've always found the old version quite hard to read.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM. Just a merge conflict

@mroeschke mroeschke merged commit fa613b3 into pandas-dev:main Dec 28, 2022
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the in_axis_grouper branch December 28, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Grouper specified by key not regarded as in-axis
2 participants