csv.write skipping lines when writing to csv

后端 未结 5 1535
旧巷少年郎
旧巷少年郎 2021-01-01 11:50

I am trying to write to a csv file via the following

file = open(\'P:\\test.csv\', \'a\') 

fieldnames = (\'ItemID\', \'Factor\', \'FixedAmount\')
wr = csv.D         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-01 12:03

    I had this problem and it was because I was using \n\r. I changed to \n and it is working now.

提交回复
热议问题