Skip to content

Conversation

jarent-nvidia
Copy link
Contributor

@jarent-nvidia jarent-nvidia commented Sep 18, 2025

Added test to ensure that pd.Grouper is immutable as list item and can be safely reused in different DataFrames. I run the same test on older pandas version (1.3.5) and ensured that the test fails with an error: ValueError: all keys need to be the same shape

@mroeschke
Copy link
Member

Thanks for the PR. Could you run the pre-commit checks?

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Sep 19, 2025
@jarent-nvidia
Copy link
Contributor Author

@mroeschke All checks passed.

@mroeschke mroeschke added this to the 3.0 milestone Sep 19, 2025
@mroeschke mroeschke merged commit 10a5305 into pandas-dev:main Sep 19, 2025
41 checks passed
@mroeschke
Copy link
Member

Thanks @jarent-nvidia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pd.groupby seems to mutate my pd.Grouper in-place

2 participants