This topic created in 2968 days ago, the information mentioned may be changed or developed.
Dataframe 如何实现将第 n+1 行各列的值减去第 n 行,结果赋于第 n 行
3 replies • 2018-03-12 18:13:25 +08:00
 |
|
1
kifile Mar 12, 2018
df.iloc[n,:]-=df.iloc[n+1,:]
|
 |
|
2
kifile Mar 12, 2018
貌似写反了 df.iloc[n,:]=df.iloc[n+1,:]-df.iloc[n,:]
|