modin.pandas.SeriesGroupBy.pct_change¶
- SeriesGroupBy.pct_change(periods=1, fill_method=_NoDefault.no_default, limit=_NoDefault.no_default, freq=None, axis=_NoDefault.no_default)[source]¶
Calculate pct_change of each value to previous entry in group.
- Parameters:
periods (int, default 1) – Periods to shift for forming percent change.
fill_method ({"bfill", "ffill", "pad"}, default "ffill") –
How to handle NAs before computing percent changes.
Deprecated: All options of fill_method are deprecated except fill_method=None.
limit (int, optional) –
The number of consecutive NAs to fill before stopping. Snowpark pandas does not yet support this parameter.
Deprecated parameter.
freq (DateOffset, timedelta, or str, optional) – Increment to use from time series API (e.g. ‘ME’ or BDay()). Snowpark pandas does not yet support this parameter.
- Returns:
Percentage changes within each group.
- Return type:
Notes
This function ignores the as_index, sort, group_keys, and dropna arguments passed to the initial groupby call.
Examples
For SeriesGroupBy:
For DataFrameGroupBy: