📅  最后修改于: 2022-03-11 14:46:00.703000             🧑  作者: Mango
>>> df = pd.DataFrame({'a': [1, 2, 3],
... 'b': [1, 1, 2],
... 'c': [1, 4, 9]})
>>> df
a b c
0 1 1 1
1 2 1 4
2 3 2 9
>>> df.diff()
a b c
0 NaN NaN NaN
1 1.0 0.0 3.0
2 1.0 1.0 5.0