pandas 0.8.1 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