The idx parameter is either a pd.Series or a pd.DateTimeIndex. It represents the index of a pandas DataFrame or Series, which contains datetime values.
required
force_regular
bool
The force_regular parameter is a boolean flag that determines whether to force the frequency to be regular. If set to True, the function will convert irregular frequencies to their regular counterparts. For example, if the inferred frequency is βBβ (business days), it will be converted to βDβ (calendar days). The default value is False.
False
Returns
Type
Description
pd.DataFrame
A pandas DataFrame with the following columns: - freq_inferred_unit: The inferred frequency of the time series from pandas. - freq_median_timedelta: The median time difference between consecutive observations in the time series. - freq_median_scale: The median time difference between consecutive observations in the time series, scaled to a common unit. - freq_median_unit: The unit of the median time difference between consecutive observations in the time series.
Examples
import pytimetk as tkimport pandas as pddates = pd.date_range(start ='2020-01-01', end ='2020-01-10', freq ='D')tk.get_frequency_summary(dates)