Skip to content

Clean up special casing in as_column for non-typed input #15276

Merged
rapids-bot[bot] merged 21 commits intorapidsai:branch-24.06from
mroeschke:ref/as_columns/misc
Apr 17, 2024
Merged

Clean up special casing in as_column for non-typed input #15276
rapids-bot[bot] merged 21 commits intorapidsai:branch-24.06from
mroeschke:ref/as_columns/misc

Conversation

@mroeschke
Copy link
Copy Markdown
Contributor

@mroeschke mroeschke commented Mar 12, 2024

Description

Redo at #14636

Clean up special casing for non-typed inputs to essentially do:

try:
     arbitrary = pa.array(arbitrary)
except:
     arbitrary = pd.Series(arbitrary)
return as_column(arbitrary)

Additionally, this change matches a behavior with pandas that will parse string data with dtype=datetime64 type similar to the 2.2 behavior (fail if the resolution of the type doesn't match the string data)

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 Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Mar 12, 2024
@mroeschke mroeschke requested a review from a team as a code owner March 12, 2024 00:55
@mroeschke mroeschke requested review from bdice and charlesbluca March 12, 2024 00:55
@mroeschke mroeschke changed the base branch from branch-24.04 to branch-24.06 March 18, 2024 22:06
Copy link
Copy Markdown
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

A few questions to make sure that I followed everything. Thanks so much for this! Anything to simplify as_column is amazing work.

@mroeschke
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit e928c4a into rapidsai:branch-24.06 Apr 17, 2024
@mroeschke mroeschke deleted the ref/as_columns/misc branch April 17, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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