Python 3 CSV file giving UnicodeDecodeError: 'utf-8' codec can't decode byte error when I print

前端 未结 7 575
梦如初夏
梦如初夏 2020-12-03 01:18

I have the following code in Python 3, which is meant to print out each line in a csv file.

import csv
with open(\'my_file.csv\', \'r\', newline=\'\') as csv         


        
7条回答
  •  一生所求
    2020-12-03 01:22

    easy... just open it in Excel or OpenOffice calc, use text as columns, select ,, and then just save the file as .csv... it takes me one day and several hour of search in google... but at the end i figure it out.

提交回复
热议问题