pandas.errors.NullFrequencyError — pandas 2.3.3 documentation (original) (raw)
- API reference
- Testing
- pandas.error...
exception pandas.errors.NullFrequencyError[source]#
Exception raised when a freq cannot be null.
Particularly DatetimeIndex.shift, TimedeltaIndex.shift,PeriodIndex.shift.
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