xarray.infer_freq#
- xarray.infer_freq(index)[source]#
Infer the most likely frequency given the input index.
- Parameters:
index (
CFTimeIndex
,DataArray
,DatetimeIndex
,TimedeltaIndex
,Series
) β If not passed a CFTimeIndex, this simply calls pandas.infer_freq. If passed a Series or a DataArray will use the values of the series (NOT THE INDEX).- Returns:
- Raises:
TypeError β If the index is not datetime-like.
ValueError β If there are fewer than three values or the index is not 1D.