cudf.core.groupby.SeriesGroupBy.pct_change#

SeriesGroupBy.pct_change(periods=1, fill_method=<no_default>, axis=0, limit=<no_default>, freq=None)[source]#

Calculates the percent change between sequential elements in the group.

Parameters:
periodsint, default 1

Periods to shift for forming percent change.

fill_methodstr, default ‘ffill’

How to handle NAs before computing percent changes.

Deprecated since version 24.04: All options of fill_method are deprecated except fill_method=None.

limitint, optional

The number of consecutive NAs to fill before stopping. Not yet implemented.

Deprecated since version 24.04: limit is deprecated.

freqstr, optional

Increment to use from time series API. Not yet implemented.

Returns:
Series or DataFrame

Percentage changes within each group