pandas.errors.NullFrequencyError#
- exception pandas.errors.NullFrequencyError[源代码][源代码]#
当
freq
不能为空时引发的异常。特别是
DatetimeIndex.shift
,TimedeltaIndex.shift
,PeriodIndex.shift
.例子
>>> df = pd.DatetimeIndex(["2011-01-01 10:00", "2011-01-01"], freq=None) >>> df.shift(2) Traceback (most recent call last): NullFrequencyError: Cannot shift with no freq