-
Notifications
You must be signed in to change notification settings - Fork 915
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
[Story] Timezone-aware datetime support #12813
Comments
Will cuDF have a "default" time zone database (implementation) when this feature is shipped? In pandas, once we drop Python 3.8 this year, we plan to default to the stdlib's |
Thanks for bring this up, @mroeschke!
Like So, cuDF will depend neither on |
Yup the sourcing of the data will align with pandas once pytz is no longer the default. A small detail question, what object will be returned in cuDF when a user asks for the
|
We could return always a |
That should be sufficient for most timezones. In pandas we also support fixed-offset timezones, UTC and any other timezone with a "fixed" UTC offset, and we plan to return |
I asked @mroeschke offline how the "fixed" UTC offsets in the above comment are different from the
I think it's safe to say that for now, cuDF will not support these kind of fixed offsets. |
@shwina: This topic came up with @vuule today. Can you describe which parts of this issue you want to implement in libcudf vs. implement as an experiment in pure Python? I think we want to eventually have C++ APIs for most/all of the features like |
@bdice: only the timezone table reader needs libcudf support; everything else can be implemented using existing libcudf algorithms. @GregoryKimball and I agreed that it's reasonable to first implement timezone-aware operations in Python, get some user/community feedback, and later eventually implement in C++. |
@shwina or @GregoryKimball do you have a sense of what remains to be done for this issue? |
It looks like we're mostly done here. I don't think we ever got to supporting binary operations with timezone-aware columns and timedeltas. Perhaps it's fine to just create an issue for that and close this story out. |
That sounds right to me. Thanks @shwina! |
Opened #15774 |
This meta-issue tracks adding support for timezone-aware datetimes to the cuDF Python API.
As discussed in #11592, it's possible to implement timezone-aware operations like tz_localize and tz_convert using algorithms already provided by the libcudf public API - namely,
lower_bound
,upper_bound
, andlabel_bins
(histogramming).What has been missing is a way to load the "time zone database" into device memory -- work on this is underway in #12805. Once we have a way to load the UTC offsets corresponding to a given timezone into a
cudf.DataFrame
, we can add implementations of timezone-aware operations, prototyped here.Tasks
.hour
,.day
, etc.,) #14240tz_convert
method to convert timezones #13329The text was updated successfully, but these errors were encountered: