pandas.errors.NullFrequencyError#

exception pandas.errors.NullFrequencyError[source]#

Exception raised when a freq cannot be null.

Particularly DatetimeIndex.shift, TimedeltaIndex.shift, PeriodIndex.shift.

See also

Index.shift

Shift values of Index.

Series.shift

Shift values of Series.

Examples

>>> 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