Skip to content

Conversation

snitish
Copy link
Member

@snitish snitish commented Jan 22, 2025

Second (and final) batch of GroupBy reductions being enhanced to support the skipna parameter.

@snitish snitish marked this pull request as draft January 22, 2025 01:33
@snitish snitish changed the title ENH: Support skipna parameter in GroupBy prod, var, std and sem methods ENH: Support skipna parameter in GroupBy min, max, prod, var, std and sem methods Jan 22, 2025
@snitish snitish marked this pull request as ready for review January 22, 2025 04:14
@snitish snitish changed the title ENH: Support skipna parameter in GroupBy min, max, prod, var, std and sem methods ENH: Support skipna parameter in GroupBy min, max, prod, median, var, std and sem methods Jan 22, 2025
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Looks pretty good. One question

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

A few smaller comments. @rhshadrach mind taking a look as well?

@rhshadrach rhshadrach added Enhancement Groupby Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Jan 25, 2025
@rhshadrach rhshadrach added this to the 3.0 milestone Jan 25, 2025
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Looks great! Can you add a test (adding to your current parametrizations would be fine) where the entire group is NA.

@snitish
Copy link
Member Author

snitish commented Jan 25, 2025

Looks great! Can you add a test (adding to your current parametrizations would be fine) where the entire group is NA.

Thanks for the review @rhshadrach. Added the all-NA tests and responded to comments.

@rhshadrach
Copy link
Member

Failure on the future infer string is unrelated (and is fixed by #60796). Rerunning Ubuntu 310 just to be sure.

@snitish snitish requested a review from rhshadrach January 31, 2025 02:47
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@rhshadrach
Copy link
Member

@WillAyd - you good here?

@WillAyd WillAyd merged commit a68048e into pandas-dev:main Feb 3, 2025
41 of 42 checks passed
@WillAyd
Copy link
Member

WillAyd commented Feb 3, 2025

Thanks @snitish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Groupby Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: enable skipna on groupby reduction ops
3 participants