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

Direct SeriesGroupBy.aggregate to SeriesGroupBy.agg #14971

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Feb 5, 2024

Closes #14957

Description

Calling SeriesGroupBy.aggregate is currently directed to GroupBy.agg instead of SeriesGroupBy.agg. This means that SeriesGroupBy.aggregate currently produces a DataFrame in many cases that it should produce a Series. This PR corrects the underlying problem.

Checklist

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

@rjzamora rjzamora added bug Something isn't working 2 - In Progress Currently a work in progress labels Feb 5, 2024
@rjzamora rjzamora self-assigned this Feb 5, 2024
@github-actions github-actions bot added the Python Affects Python cuDF API. label Feb 5, 2024
@rjzamora rjzamora added the non-breaking Non-breaking change label Feb 5, 2024
@rjzamora rjzamora marked this pull request as ready for review February 5, 2024 22:22
@rjzamora rjzamora requested a review from a team as a code owner February 5, 2024 22:22
@rjzamora rjzamora added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 5, 2024
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

One suggestion, otherwise looks like a good fix. Thanks @rjzamora!

python/cudf/cudf/tests/groupby/test_agg.py Outdated Show resolved Hide resolved
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Feb 6, 2024
@rjzamora
Copy link
Member Author

rjzamora commented Feb 6, 2024

/merge

@rapids-bot rapids-bot bot merged commit 20ed009 into rapidsai:branch-24.04 Feb 6, 2024
68 checks passed
@rjzamora rjzamora deleted the fix-series-agg branch February 6, 2024 14:16
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
Development

Successfully merging this pull request may close these issues.

[BUG] SeriesGroupBy.aggregate is inconsistent with pandas
3 participants