4.8.9.1.8. statsmodels.tsa.tsatools.freq_to_period

statsmodels.tsa.tsatools.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.