for i, rows in df.iterrows():
x, y = df.iloc[rows].copy(), df.iloc[rows+1].copy()
df.iloc[rows], df.iloc[rows+1] = y, x
break
执行时出现错误:
位置索引器超出范围`
for i, rows in df.iterrows():
x, y = df.iloc[rows].copy(), df.iloc[rows+1].copy()
df.iloc[rows], df.iloc[rows+1] = y, x
break
执行时出现错误:
位置索引器超出范围`