4.8.8.1.2. statsmodels.tsa.seasonal.freq_to_period

statsmodels.tsa.seasonal.freq_to_period(freq)[source]

Convert a pandas frequency to a periodicity

Parameters:

freq : str or offset

Frequency to convert

Returns:

period : int

Periodicity of freq

Notes

Annual maps to 1, quarterly maps to 4, monthly to 12, weekly to 52.