Skip to content

PERF: groupby.transform skip fast path when only a single group exists #45820

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
Feb 4, 2022

Conversation

lukemanley
Copy link
Member

groupby.transform can skip the fast path evaluation when only a single group exists. See additional comments in #44977.

Note: one test had to be updated as it applied a groupby on a single group and expected a warning that is only generated by the fast path. The test was updated to include multiple groups so that the fast path would get evaluated.

@jreback jreback added this to the 1.5 milestone Feb 4, 2022
@jreback jreback added Groupby Performance Memory or execution speed performance labels Feb 4, 2022
@jreback jreback merged commit 357845d into pandas-dev:main Feb 4, 2022
@jreback
Copy link
Contributor

jreback commented Feb 4, 2022

thanks @lukemanley

@lukemanley lukemanley deleted the groupby-transform-single-group branch March 2, 2022 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: groupby.transform calls the user function ~1.5 times more than necessary
2 participants