hipdf.core.groupby.groupby.GroupBy.diff

Contents

hipdf.core.groupby.groupby.GroupBy.diff#

20 min read time

Applies to Linux

GroupBy.diff(periods=1, axis=0)#

Get the difference between the values in each group.

Parameters#

periodsint, default 1

Periods to shift for calculating difference, accepts negative values.

axis{0 or ‘index’, 1 or ‘columns’}, default 0

Take difference over rows (0) or columns (1). Only row-wise (0) shift is supported.

Returns#

Series or DataFrame

First differences of the Series or DataFrame.