timeseries_unit_frequency_table

timeseries_unit_frequency_table(wide_format=False, engine='pandas')

The function timeseries_unit_frequency_table returns a pandas DataFrame with units of time and their corresponding frequencies in seconds.

Parameters

Name Type Description Default
wide_format bool The wide_format parameter determines the format of the output table. If wide_format is set to True, the table will be transposed. False
engine str The engine parameter is used to specify the engine to use for generating the timeseries unit frequency table. It can be either “pandas” or “polars”. - The default value is “pandas”. - When “polars”, the function will internally use the polars library for generating a timeseries unit frequency table. 'pandas'

Returns

Type Description
pd.DataFrame a pandas DataFrame that contains two columns: “unit” and “freq”. The “unit” column contains the units of time (seconds, minutes, hours, etc.), and the “freq” column contains the corresponding frequencies in seconds for each unit.

Examples

import pytimetk as tk

tk.timeseries_unit_frequency_table()
unit freq freq_min freq_max
0 sec 0 0 0
1 min 60 60 60
2 hour 3600 3600 3600
3 day 86400 86400 86400
4 week 604800 604800 604800
5 month 2678400 2419200 2678400
6 quarter 7948800 7689600 8035200
7 year 31622400 31536000 31622400