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

Prevent bad ColumnAccessor state after .sort_index(axis=1, ignore_index=True) #16061

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

mroeschke
Copy link
Contributor

Description

Before ColumnAccessor.names was modified with new column labels without the ColumnAccessor._data dict keys being modified. This could hide a subtle bug if one later uses ColumnAccessor._data.keys() to access column labels instead of ColumnAccessor.names

Checklist

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

@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. non-breaking Non-breaking change labels Jun 19, 2024
@mroeschke mroeschke requested a review from a team as a code owner June 19, 2024 00:46
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Is there a test that would have caught this?

@mroeschke
Copy link
Contributor Author

Is there a test that would have caught this?

Looks like there wasn't. I added one in the last commit

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit b9a0b72 into rapidsai:branch-24.08 Jun 25, 2024
73 checks passed
@mroeschke mroeschke deleted the fix/state/sort_index branch June 25, 2024 00:11
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.

2 participants