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

BUG: rolling.groupby with on and __getitem__ doesn't mutate underlying object #43374

Merged

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Groupby Window rolling, ewma, expanding labels Sep 3, 2021
@mroeschke mroeschke added this to the 1.4 milestone Sep 3, 2021
@@ -398,6 +398,7 @@ Groupby/resample/rolling
- Bug in :meth:`pandas.DataFrame.rolling` operation along rows (``axis=1``) incorrectly omits columns containing ``float16`` and ``float32`` (:issue:`41779`)
- Bug in :meth:`Resampler.aggregate` did not allow the use of Named Aggregation (:issue:`32803`)
- Bug in :meth:`Series.rolling` when the :class:`Series` ``dtype`` was ``Int64`` (:issue:`43016`)
- Bug in :meth:`DataFrame.groupby.rolling` when specifying ``on`` and calling ``__getitem__`` would return subsequent incorrect results (:issue:`43355`)
Copy link
Member

Choose a reason for hiding this comment

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

"return subsequent" -> "subsequently return"?

@simonjayhawkins
Copy link
Member

Thanks @mroeschke This does not close the issue? (as indicated in the OP)

There are still the issues of the inconsistent indexes between grp.count() and grp["y"].count() and the issue of the change in index from 1.2.5?

@mroeschke
Copy link
Member Author

Sorry, since #43355 reported 2 bugs, this just addresses one of them.

I just opened up #43405 separately since this PR does not address the index inconsistency.

@simonjayhawkins
Copy link
Member

I just opened up #43405 separately since this PR does not address the index inconsistency.

Thanks @mroeschke

There are still the issues of the inconsistent indexes between grp.count() and grp["y"].count() and the issue of the change in index from 1.2.5?

there was a typo here. the index didn't change from 1.2.5, the result columns did. There was a change in index from 1.1.5. I've commented on the issue. #43405 (comment)

@jreback jreback merged commit 721f7bf into pandas-dev:master Sep 6, 2021
@jreback
Copy link
Contributor

jreback commented Sep 6, 2021

thanks @mroeschke

@mroeschke mroeschke deleted the bug/groupby_rolling_on_getitem_mutate branch September 6, 2021 17:14
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Groupby rolling count gives inconsistent outputs with missing index
4 participants