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

Align DatetimeIndex APIs with pandas 2.x #16367

Merged

Conversation

mroeschke
Copy link
Contributor

Description

Mostly transferring methods that were defined on Series.dt methods to DatetimeColumn so it could be reused in DatetimeIndex

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 Jul 23, 2024
@mroeschke mroeschke requested a review from a team as a code owner July 23, 2024 20:30
@mroeschke mroeschke requested review from wence- and bdice July 23, 2024 20:30
@vyasr vyasr changed the base branch from branch-24.08 to branch-24.10 July 25, 2024 03:32
"""
return self.to_pandas().to_pydatetime()

def to_julian_date(self) -> Index:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add pytests to cover these newly added APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure added tests in the latest commit

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.

Tiny nit

Comment on lines 2509 to 2512
if method == "std":
request.applymarker(
pytest.mark.xfail(reason="cudf returns imprecise nanoseconds")
)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit move this up to the parametrization as:

pytest.param("std", marks=pytest.mark.xfail(...))

Also, do we have an open issue for this? No, but opened #16444

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 5bcd8e0 into rapidsai:branch-24.10 Jul 31, 2024
79 checks passed
@mroeschke mroeschke deleted the api/datetimeindex/alignment branch July 31, 2024 20:34
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
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants