add_time_columns()
Add local time columns to a commits DataFrame.
Usage
add_time_columns(
df,
tz=None,
)Converts the UTC timestamp column to tz and adds local_ts, date, hour, weekday (a Monday to Sunday enum), and year. collect_git_commits() calls this for you; use it on commits loaded from a file.
Parameters
df: polars.DataFrame-
Must have a time zone aware
timestampcolumn. tz: str = None-
IANA time zone name, such as
"America/Phoenix". Defaults to the system zone.
Returns
polars.DataFrame