Use Python to write on specific columns in csv file

前端 未结 2 953
萌比男神i
萌比男神i 2021-02-04 17:06

I have data in a file and I need to write it to CSV file in specific column. The data in file is like this:

002100
002077
002147

My code is th

2条回答
  •  迷失自我
    2021-02-04 17:24

    Read the docs and use the csv module from the standard library.

    But to be slightly more specific, you can do:

    for column in row:
        do things
    

提交回复
热议问题