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: DataFrameGroupBy.get_group was raising with length>1 tuples #17653

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Dec 23, 2024

Description

#17216 added similar logic to what's in pandas https://github.com/pandas-dev/pandas/blob/602ae10f3d0d599ebbdd151e8a09f0baf20b4637/pandas/core/groupby/groupby.py#L787-L794, but missed one crucial ingredient: checking that the length of the keys is 1 before raising

Checklist

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

closes #17650

@MarcoGorelli MarcoGorelli requested a review from a team as a code owner December 23, 2024 09:01
Copy link

copy-pr-bot bot commented Dec 23, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Dec 23, 2024
@MarcoGorelli MarcoGorelli changed the title fix: DataFrameGroupBy.get_group was raising with length>1 tuples Fix: DataFrameGroupBy.get_group was raising with length>1 tuples Dec 23, 2024
@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels Dec 23, 2024
@bdice
Copy link
Contributor

bdice commented Dec 23, 2024

/ok to test

@bdice
Copy link
Contributor

bdice commented Dec 23, 2024

Thanks @MarcoGorelli! This is a straightforward fix and has a test, so I will go ahead and let it automerge if CI passes.

@bdice
Copy link
Contributor

bdice commented Dec 23, 2024

/merge

@bdice
Copy link
Contributor

bdice commented Dec 23, 2024

/ok to test

@rapids-bot rapids-bot bot merged commit 45b40c5 into rapidsai:branch-25.02 Dec 23, 2024
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] groupby.get_group raises KeyError
2 participants