Skip to content

Remove cudf.Scalar from .dt timedelta properties #17863

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

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

mroeschke
Copy link
Contributor

Description

Towards #17843

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 Jan 29, 2025
@mroeschke mroeschke self-assigned this Jan 29, 2025
@mroeschke mroeschke requested a review from a team as a code owner January 29, 2025 19:36
Copy link
Contributor

@Matt711 Matt711 left a comment

Choose a reason for hiding this comment

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

Thanks for simplifying this code!

@@ -484,88 +484,57 @@ def components(self) -> dict[str, ColumnBase]:
4 37 13 12 14 234 0 0
"""

@functools.cache
def get_unit_conversion(reso: str) -> np.timedelta64:
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we can reuse this function throughout this module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Was able to move this to the top level of this file

Copy link
Contributor

@Matt711 Matt711 left a comment

Choose a reason for hiding this comment

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

Thanks, looks great! Should we re-target to 25.04?

@mroeschke
Copy link
Contributor Author

Should we re-target to 25.04?

Sure thing. This PR isn't a priority so don't want to consume merge CI time

@mroeschke mroeschke changed the base branch from branch-25.02 to branch-25.04 January 31, 2025 22:11
@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit bd76fa8 into rapidsai:branch-25.04 Jan 31, 2025
113 checks passed
@mroeschke mroeschke deleted the cln/cudf_scalar/timedelta branch January 31, 2025 22:28
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.

2 participants