If you want to get the difference between rows of a pandas DataFrame, use df.diff().
df.diff()
Adjust the periods argument to shift more than one period for calculating the difference.
periods
My previous tips on pandas.
Comments are closed.
Comments are closed.