pandas清空DataFrame

df.drop(df.index, inplace=True)
df=df.drop(index=df.index)

DataFrame内的数据会被清空,但会保留表头

你可能感兴趣的:(Pandas)