How to convert datetime64[ns] effective to other timezones? #1675
-
Hi, we have a basic Dataframe like this: The process time is in UTC and we want to group by hour and aggregate by total_net using mean:
Result would be: Are there any best practices for converting the UTC timestamps to other Timezones using native vaex (like pandas .tz_localize and .tz_convert), e.g. User wants to see the aggregation in Timezone "Europe/Berlin" instead of "UTC"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No native way i am afraid. I guess your best bet is to either do that prior to loading the data with vaex, or use some function (perhaps that of pandas) with If this is a one-time thing conversion, you can "pay the price" with apply, and then maybe |
Beta Was this translation helpful? Give feedback.
No native way i am afraid. I guess your best bet is to either do that prior to loading the data with vaex, or use some function (perhaps that of pandas) with
apply
. I vaexapply
works in parallel, but best to be avoided if not necessary.If this is a one-time thing conversion, you can "pay the price" with apply, and then maybe
df.materialize
the new column or store it to disk.