ExtensionArray.
shift
Shift values by desired number.
Newly introduced missing values are filled with self.dtype.na_value.
self.dtype.na_value
New in version 0.24.0.
The number of periods to shift. Negative values are allowed for shifting backwards.
The scalar value to use for newly introduced missing values. The default is self.dtype.na_value.
Shifted.
Notes
If self is empty or periods is 0, a copy of self is returned.
self
periods
If periods > len(self), then an array of size len(self) is returned, with all values filled with self.dtype.na_value.
periods > len(self)