pandas.errors.NullFrequencyError — pandas 3.0.0rc0+40.gecf28e538a documentation (original) (raw)
- API reference
- Testing
- 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
On this page