ExtensionArray.shift(self, periods: int = 1, fill_value: object = None) → pandas.core.dtypes.generic.ABCExtensionArray
[source]
Shift values by desired number.
Newly introduced missing values are filled with self.dtype.na_value
.
New in version 0.24.0.
Parameters: |
|
---|---|
Returns: |
|
If self
is empty or periods
is 0, a copy of self
is returned.
If periods > len(self)
, then an array of size len(self) is returned, with all values filled with self.dtype.na_value
.
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.api.extensions.ExtensionArray.shift.html