modin.pandas.SeriesGroupBy.shift¶
- SeriesGroupBy.shift(periods: int = 1, freq: int = None, axis: Union[int, Literal['index', 'columns', 'rows']] = 0, fill_value: Any = None)[source]¶
Shift each group by periods observations.
If freq is passed, the index will be increased using the periods and the freq.
- Parameters:
periods (int, default 1) – Number of periods to shift.
freq (str, optional) – Frequency string.
axis (axis to shift, default 0) – Shift direction. Snowpark pandas does not yet support axis=1.
fill_value (optional) – The scalar value to use for newly introduced missing values.
- Returns:
Object shifted within each group.
- Return type:
Examples
For SeriesGroupBy:
For DataFrameGroupBy: