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

Correctly accept a pandas.CategoricalDtype(pandas.IntervalDtype(...), ...) type #17604

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

mroeschke
Copy link
Contributor

Description

From an offline discussion, a pandas object with an category[interval[...]] type would be incorrectly be interpreted as a category[struct[...]] type. This can cause further problems with cudf.pandas as a category[struct[...]] type cannot be properly interpreted by pandas.

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 Dec 16, 2024
@mroeschke mroeschke requested a review from a team as a code owner December 16, 2024 22:41
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.

Can we add any further test coverage here? I don't know how well we support intervals.

@mroeschke
Copy link
Contributor Author

Can we add any further test coverage here? I don't know how well we support intervals.

I amended the unit test to have a test case start the roundtrip from pandas instead of cudf. I think we have OK general test coverage of interval functionality in test_interval.py

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 5802d34 into rapidsai:branch-25.02 Dec 17, 2024
105 checks passed
@mroeschke mroeschke deleted the bug/categorical_interval branch December 17, 2024 01:38
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