Get your own Python server Result Size: 625 x 565
x
 
import pandas as pd
data = [[10, 18, 11], [13, 15, 8], [9, 20, 3]]
df = pd.DataFrame(data)
print(df.diff())
       0    1    2
  0  NaN  NaN  NaN
  1  3.0 -3.0 -3.0
  2 -4.0  5.0 -5.0