pandas 0.8.0 documentation

pandas.DataFrame.diff

DataFrame.diff(periods=1)

1st discrete difference of object

Parameters :

periods : int, default 1

Periods to shift for forming difference

Returns :

diffed : DataFrame