Skip to content

Allow StringColumn to always accept pandas string extention types - #21251

Closed
mroeschke wants to merge 8 commits into
NVIDIA:mainfrom
mroeschke:ref/cudf/stringdtype_pt1
Closed

Allow StringColumn to always accept pandas string extention types#21251
mroeschke wants to merge 8 commits into
NVIDIA:mainfrom
mroeschke:ref/cudf/stringdtype_pt1

Conversation

@mroeschke

@mroeschke mroeschke commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Description

Towards #21229

  • Made is_dtype_obj_string stricter to only accept dtype objects and subsequently simplified _validate_args
  • Simplified StringColumn.to_pandas to correctly handle extension types

I am also adding some tests to our xfail list. I believe we may be loosing tracking of pandas string extension types in other spots.

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 self-assigned this Jan 29, 2026
@mroeschke mroeschke added the Python Affects Python cuDF API. label Jan 29, 2026
@mroeschke
mroeschke requested a review from a team as a code owner January 29, 2026 20:45
@mroeschke mroeschke added the improvement Improvement / enhancement to an existing function label Jan 29, 2026
@mroeschke
mroeschke requested a review from bdice January 29, 2026 20:45
@mroeschke mroeschke added the non-breaking Non-breaking change label Jan 29, 2026
@mroeschke
mroeschke requested a review from Matt711 January 29, 2026 20:45
@GPUtester GPUtester moved this to In Progress in cuDF Python Jan 29, 2026
@github-actions github-actions Bot added the cudf.pandas Issues specific to cudf.pandas label Jan 29, 2026
@vyasr

vyasr commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Looks like there are issues with our test suite in addition to the pandas test suite. Hopefully fixing the first will also reduce what you have to xfail in conftest-patch.

if (
not cudf.get_option("mode.pandas_compatible")
and dtype != CUDF_STRING_DTYPE
and dtype.kind != "U"

@galipremsagar galipremsagar Jan 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you will have to bring back this check(minus the pandas compatibility flag) to make np.dtype(object), np.dtype('str') and nullable dtypes work. Those are probably the causes for the new xfails.

@mroeschke

Copy link
Copy Markdown
Contributor Author

I'm going to split the changes in this PR to isolate what might be failing the pandas tests. One split is making this validators stricter in #21281

@mroeschke mroeschke closed this Feb 2, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Feb 2, 2026
@mroeschke
mroeschke deleted the ref/cudf/stringdtype_pt1 branch February 2, 2026 19:33
@mroeschke mroeschke mentioned this pull request Feb 5, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf.pandas Issues specific to cudf.pandas improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants