Skip to content

BUG: Inconsistent types for groupby group names when grouping with a length-1 list #58945

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

Conversation

natmokval
Copy link
Contributor

@natmokval natmokval commented Jun 6, 2024

xref #58858
fixed bug in groupby group names when grouping with a length-1 list

@natmokval
Copy link
Contributor Author

natmokval commented Jul 2, 2024

in this PR I changed group keys type to 1-tuples when grouping with a length-1 list for consistency with the type of group names.

To fix the inconsistency with the types, I added the parameter key_dtype_str in the Grouping constructor. However, these changes have caused some tests to fail, such as: pandas/tests/groupby/test_grouping.py -k test_groups

I think my changes should not break existing tests. @rhshadrach, could you please take a look at my changes?

@rhshadrach
Copy link
Member

However, these changes have caused some tests to fail, such as: pandas/tests/groupby/test_grouping.py -k test_groups

This test is checking the behavior that you're changing, the test needs to be updated to the new behavior. In any case, I think this needs to be deprecated before this change can be made.

Copy link
Contributor

github-actions bot commented Aug 4, 2024

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Aug 4, 2024
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants