pandas.errors.NullFrequencyError #

异常 pandas.errors。NullFrequencyError [来源] #

freq当 a不能为 null时引发异常。

特别DatetimeIndex.shiftTimedeltaIndex.shiftPeriodIndex.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