xorbits.pandas.infer_freq#
- xorbits.pandas.infer_freq(index: DatetimeIndex | TimedeltaIndex | Series | DatetimeLikeArrayMixin) str | None [源代码]#
Infer the most likely frequency given the input index.
- 参数
index (DatetimeIndex, TimedeltaIndex, Series or array-like) – If passed a Series will use the values of the series (NOT THE INDEX).
- 返回
None if no discernible frequency.
- 返回类型
str or None
- 引发
TypeError – If the index is not datetime-like.
ValueError – If there are fewer than three values.
实际案例
>>> idx = pd.date_range(start='2020/12/01', end='2020/12/30', periods=30) >>> pd.infer_freq(idx) 'D'
警告
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.