Skip to content

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