How to delete columns in a CSV file?

后端 未结 9 1743
你的背包
你的背包 2020-11-27 18:05

I have been able to create a csv with python using the input from several users on this site and I wish to express my gratitude for your posts. I am now stumped and will po

9条回答
  •  鱼传尺愫
    2020-11-27 18:21

    I would use Pandas with col number

    f = pd.read_csv("test.csv", usecols=[0,1,3,4])

    f.to_csv("test.csv", index=False)

提交回复
热议问题