其他分享
首页 > 其他分享> > 两列互换

两列互换

作者:互联网

代码:

import pandas as pd

data = pd.read_csv("./test.csv", error_bad_lines=False, encoding="utf-8")

 

 

 

data = data.loc[:, ["Topology","Batch Size","KPI","FP32"]]

 

 

 

保存数据

data.to_csv('test.csv', index=False, encoding='utf-8')

 

标签:utf,互换,encoding,pd,test,两列,csv,data
来源: https://www.cnblogs.com/yu121/p/15568382.html