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).
- warnbool, default True
- Returns
- str or None
None if no discernible frequency.
- Raises
- TypeError
If the index is not datetime-like.
- ValueError
If there are fewer than three values.