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

Fix construction of Grouping objects #13932

Merged
merged 8 commits into from
Aug 23, 2023

Conversation

galipremsagar
Copy link
Contributor

@galipremsagar galipremsagar commented Aug 22, 2023

Description

This PR fixes multiple issues with groupby where the consequent operations on a groupby object always return incorrect results due to an inplace modification that happens in the Groupby constructor. To fix this, take a copy of the by argument whenever it is an (internal) _Grouping object.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar requested a review from a team as a code owner August 22, 2023 01:51
@galipremsagar galipremsagar marked this pull request as draft August 22, 2023 01:51
@github-actions github-actions bot added the Python Affects Python cuDF API. label Aug 22, 2023
@galipremsagar galipremsagar self-assigned this Aug 23, 2023
@galipremsagar galipremsagar marked this pull request as ready for review August 23, 2023 00:33
@galipremsagar galipremsagar added bug Something isn't working non-breaking Non-breaking change 3 - Ready for Review Ready for review by team 4 - Needs cuDF (Python) Reviewer labels Aug 23, 2023
python/cudf/cudf/core/groupby/groupby.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/resample.py Show resolved Hide resolved
python/cudf/cudf/core/series.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/groupby/groupby.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/groupby/groupby.py Show resolved Hide resolved
@wence-
Copy link
Contributor

wence- commented Aug 23, 2023

Serialization test looks like it fails https://github.com/rapidsai/cudf/actions/runs/5953195610/job/16147414724?pr=13932

@galipremsagar
Copy link
Contributor Author

Serialization test looks like it fails https://github.com/rapidsai/cudf/actions/runs/5953195610/job/16147414724?pr=13932

Fixed it 👍

@galipremsagar galipremsagar added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Aug 23, 2023
@galipremsagar
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit abac227 into rapidsai:branch-23.10 Aug 23, 2023
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
4 participants