Skip to content

BUG: Groupby cumprod nan influences other columns with skipna False #48064

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
Aug 15, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Aug 12, 2022

  • closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Saw this when working on mask support

previously this returned

      b    c
0  22.0  1.0
1   NaN  NaN
2   NaN  3.0

because the calculation in the second row was skipped for the second column after the NaN was encountered

@mroeschke mroeschke added this to the 1.5 milestone Aug 15, 2022
@mroeschke mroeschke merged commit 315bcd0 into pandas-dev:main Aug 15, 2022
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the cumprod_bug branch August 15, 2022 17:27
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.

2 participants