id_time_grid
| Name | Type | Description | Default |
|---|---|---|---|
df | pandas or polars DataFrame | Input data | required |
freq | str or int | Series’ frequency | required |
start | (str, int, date or datetime) | Initial timestamp for the series. * ‘per_serie’ uses each serie’s first timestamp * ‘global’ uses the first timestamp seen in the data * Can also be a specific timestamp or integer, e.g. ‘2000-01-01’, 2000 or datetime(2000, 1, 1) Defaults to “per_serie”. | ‘per_serie’ |
end | (str, int, date or datetime) | Initial timestamp for the series. * ‘per_serie’ uses each serie’s last timestamp * ‘global’ uses the last timestamp seen in the data * Can also be a specific timestamp or integer, e.g. ‘2000-01-01’, 2000 or datetime(2000, 1, 1) Defaults to “global”. | ‘global’ |
id_col | str | Column that identifies each serie. Defaults to ‘unique_id’. | ‘unique_id’ |
time_col | str | Column that identifies each timestamp. Defaults to ‘ds’. | ‘ds’ |
| Type | Description |
|---|---|
DFType | pandas or polars DataFrame: Dataframe with expected ids and times. |
fill_gaps
| Name | Type | Description | Default |
|---|---|---|---|
df | pandas or polars DataFrame | Input data | required |
freq | str or int | Series’ frequency | required |
start | (str, int, date or datetime) | Initial timestamp for the series. * ‘per_serie’ uses each serie’s first timestamp * ‘global’ uses the first timestamp seen in the data * Can also be a specific timestamp or integer, e.g. ‘2000-01-01’, 2000 or datetime(2000, 1, 1) Defaults to “per_serie”. | ‘per_serie’ |
end | (str, int, date or datetime) | Initial timestamp for the series. * ‘per_serie’ uses each serie’s last timestamp * ‘global’ uses the last timestamp seen in the data * Can also be a specific timestamp or integer, e.g. ‘2000-01-01’, 2000 or datetime(2000, 1, 1) Defaults to “global”. | ‘global’ |
id_col | str | Column that identifies each serie. Defaults to ‘unique_id’. | ‘unique_id’ |
time_col | str | Column that identifies each timestamp. Defaults to ‘ds’. | ‘ds’ |
| Type | Description |
|---|---|
DFType | pandas or polars DataFrame: Dataframe with gaps filled. |

