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

[FEA] Support datetime64[D] #16803

Closed
nghiadt22 opened this issue Sep 13, 2024 · 4 comments
Closed

[FEA] Support datetime64[D] #16803

nghiadt22 opened this issue Sep 13, 2024 · 4 comments
Labels
feature request New feature or request Python Affects Python cuDF API. question Further information is requested

Comments

@nghiadt22
Copy link

Describe the solution you'd like
please let cudf to support datetime64[D].

Describe alternatives you've considered
I had to convert my datetime to integer for filter and etc.

@nghiadt22 nghiadt22 added the feature request New feature or request label Sep 13, 2024
@mroeschke
Copy link
Contributor

Thanks for the request. Just to understand your use case, do you regularly work with dates before 2.9e11 BC or after 2.9e11 AD?

For reference, pandas 2.0 also does not support datetime64[D]. The largest precision cudf supports is datetime64[s] which matches pandas and allows dates representable between [2.9e11 BC, 2.9e11 AD]

@mroeschke mroeschke added Python Affects Python cuDF API. 0 - Waiting on Author Waiting for author to respond to review question Further information is requested and removed 0 - Waiting on Author Waiting for author to respond to review labels Sep 16, 2024
@nghiadt22
Copy link
Author

Thanks @mroeschke. I got around my problem pretty easily by converting my string dates formatted as "yyyymmdd" into numbers for comparison.

That's all I wanted: to compare my dates.

I just thought that it'd enable more options for the user since cudf's supported data format becomes more granular.
However, I understand that cudf is intertwined with pandas so this feature is only valuable when both libs work.
So, from your POV, is it worth it? Please let me know what you think.

@mroeschke
Copy link
Contributor

However, I understand that cudf is intertwined with pandas so this feature is only valuable when both libs work.

Not necessarily; one could use cudf independently of pandas and cudf could support day resolution datetime type. But a day resolution type is functionally equivalent to other resolutions (i.e. "compare your dates" will work with any resolution); the only difference is that day resolution can represent a wider range of dates.

So for the team to consider implementing this feature, there needs to be a demand/use case to store dates beyond [2.9e11 BC, 2.9e11 AD]

@nghiadt22
Copy link
Author

However, I understand that cudf is intertwined with pandas so this feature is only valuable when both libs work.

Not necessarily; one could use cudf independently of pandas and cudf could support day resolution datetime type. But a day resolution type is functionally equivalent to other resolutions (i.e. "compare your dates" will work with any resolution); the only difference is that day resolution can represent a wider range of dates.

So for the team to consider implementing this feature, there needs to be a demand/use case to store dates beyond [2.9e11 BC, 2.9e11 AD]

I see. Thank you for your effort and promptly feedback. I'll close this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Affects Python cuDF API. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants