pandas.Series.diff

Series.diff(periods=1)

1st discrete difference of object

Parameters:

periods : int, default 1

Periods to shift for forming difference

Returns:

diffed : Series