xorbits.pandas.infer_freq#
- xorbits.pandas.infer_freq(index: DatetimeIndex | TimedeltaIndex | Series | DatetimeLikeArrayMixin) str | None [source]#
Infer the most likely frequency given the input index.
- Parameters
index (DatetimeIndex, TimedeltaIndex, Series or array-like) – If passed a Series will use the values of the series (NOT THE INDEX).
- Returns
None if no discernible frequency.
- Return type
str or None
- Raises
TypeError – If the index is not datetime-like.
ValueError – If there are fewer than three values.
Examples
>>> idx = pd.date_range(start='2020/12/01', end='2020/12/30', periods=30) >>> pd.infer_freq(idx) 'D'
Warning
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.