You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be useful to provide a function to split a DataFrame by groups as like polars.dataframe.group_by.GroupBy.__iter__ in Python.
My use case is to add a naive time column with the local time for each row of a table that has a column with UTC time and a local time zone string.
Currently the function to change the timezone does not take Expr as input, so I need to split the DataFrame for each timezone string and add the columns back into one DataFrame after adding them.
Yeah, not ideal indeed, but how do they do that in py-polars?
There is no way to do this in Python, and I believe we would need to use the iterator.
(The clock package is very good at handling this in a vectorized way)
It might be useful to provide a function to split a DataFrame by groups as like
polars.dataframe.group_by.GroupBy.__iter__
in Python.My use case is to add a naive time column with the local time for each row of a table that has a column with UTC time and a local time zone string.
Currently the function to change the timezone does not take Expr as input, so I need to split the DataFrame for each timezone string and add the columns back into one DataFrame after adding them.
With the
clock
package:Created on 2024-03-03 with reprex v2.0.2
With
polars
now...Created on 2024-03-03 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: