Skip to content
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

REF: remove _get_grouper, make Grouper.__init__ less stateful #51155

Merged
merged 4 commits into from
Feb 6, 2023

Conversation

jbrockmendel
Copy link
Member

Having a BaseGrouper._get_grouper, BinGrouper._get_grouper, and Grouper._get_grouper that all do different things is making my eye twitch.

L509-513 the case where isinstance(newgrouper, ops.BaseGrouper) looks like things might go wrong if we ever get there with len(newgrouper.groupings) > 1, but we have no tests that get there and this is too spaghettified for me to be sure. cc @jreback

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm

@mroeschke mroeschke added this to the 2.0 milestone Feb 6, 2023
@mroeschke mroeschke added Refactor Internal refactoring of code Groupby labels Feb 6, 2023
@mroeschke mroeschke merged commit 9bd15db into pandas-dev:main Feb 6, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-grouping_vector branch February 6, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants