py_research.time module
Utilities for working with date and time in data.
-
datetime_to_interval_series(datetime_series, time_interval=<YearEnd: month=12>, format=None, interval_col=None)[source]
Assign intervals matching datetime_col
to new column.
- Parameters:
datetime_series (Series) – Series of datetime values.
time_interval (BaseOffset) – Interval to use for grouping.
format (str | None) – Format to use for the interval column.
interval_col (str | None) – Name of the interval column.
- Returns:
Series of intervals matching datetime_col
.
- Return type:
Series