pandas.infer_freqΒΆ

pandas.infer_freq(index, warn=True)[source]ΒΆ

Infer the most likely frequency given the input index. If the frequency is uncertain, a warning will be printed.

Parameters
indexDatetimeIndex or TimedeltaIndex

if passed a Series will use the values of the series (NOT THE INDEX)

warnboolean, default True
Returns
str or None

None if no discernible frequency TypeError if the index is not datetime-like ValueError if there are less than three values.

Scroll To Top