modin.pandas.DataFrame.shift¶
- DataFrame.shift(periods: int = 1, freq=None, axis: Union[int, Literal['index', 'columns', 'rows']] = 0, fill_value: Hashable = _NoDefault.no_default) DataFrame[source]¶
Shift data by desired number of periods along axis and replace columns with fill_value (default: None).
Snowpark pandas does not support freq currently.
- Parameters:
periods (int) – Number of periods to shift. Can be positive or negative.
freq (not supported, default None) –
axis ({0 or 'index', 1 or 'columns', None}, default None) – Shift direction.
fill_value (object, optional) – The scalar value to use for newly introduced missing values. the default depends on the dtype of self. For numeric data,
np.nanis used. For datetime, timedelta, or period data, etc.NaTis used. For extension dtypes,self.dtype.na_valueis used.
- Returns:
Copy of input object, shifted.
- Return type:
Examples