Skip to content

BUG: RollingGroupby no longer keeps the groupby column in the result #40341

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 10 commits into from
Mar 29, 2021

Conversation

mroeschke
Copy link
Member

Borrowed some work from #32332

@mroeschke mroeschke added Bug Window rolling, ewma, expanding labels Mar 10, 2021
@mroeschke mroeschke added this to the 1.3 milestone Mar 10, 2021
@jreback
Copy link
Contributor

jreback commented Mar 23, 2021

cc @pandas-dev/pandas-core, @pandas-dev/pandas-triage if any comments (this was a discussion item on the call i think month before last)

@mroeschke
Copy link
Member Author

#38787 was the discussion item I believe you are referring to @jreback which this PR does not address

@@ -558,6 +558,10 @@ def __init__(
if _grouper is None:
raise ValueError("Must pass a Grouper object.")
self._grouper = _grouper
# GH 32262: It's convention to keep the grouping column in
Copy link
Member

Choose a reason for hiding this comment

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

is the difference in conventions just a historical thing? might we want to make these match eventually?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems to be historical #32332 (review)

Would be great to have groupby apply match but might take come convincing

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@jreback jreback merged commit ab599f3 into pandas-dev:master Mar 29, 2021
@jreback
Copy link
Contributor

jreback commented Mar 29, 2021

thanks @mroeschke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rolling groupby should not maintain the by column in the resulting DataFrame
3 participants