-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Rolling groupby should not maintain the by column in the resulting DataFrame #32262
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
Comments
update the top with a minimal reproducible example |
Thanks @Kraxelhuber for the report! To expedite resolution, could you please copy and paste your example into the issue you opened? |
This isn't just confined to
|
take |
Not sure if it's the same issue, but I see a similar thing with (
pd.DataFrame({
'a': [0, 0, 0, 1, 1, 1, 1],
'val': [10, 12, 11, 105, 103, 109, 109]
})
.set_index('a')
.groupby('a')
.expanding()
.max()
) The same does not happen when using, for instance, (pandas version 1.0.1) |
When performing a
rolling
operation on agroupby
object, the index level will be incorrectly maintained in the dataframe.This issue has been discussed in #14013.
It has been closed eventhough the bug still exists in v1.01.
The text was updated successfully, but these errors were encountered: