pandas.errors.NullFrequencyError#
- exception pandas.errors.NullFrequencyError[source]#
当
freq不能为 null 时引发的异常。特别地,
DatetimeIndex.shift、TimedeltaIndex.shift、PeriodIndex.shift。另请参阅
Index.shift移动 Index 的值。
Series.shiftSeries 的移位值。
示例
>>> 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