UnicodeDecodeError when reading CSV file in Pandas with Python

后端 未结 21 2234
野趣味
野趣味 2020-11-22 04:27

I\'m running a program which is processing 30,000 similar files. A random number of them are stopping and producing this error...

File "C:\\Importer\\src         


        
21条回答
  •  [愿得一人]
    2020-11-22 04:46

    I have trouble opening a CSV file in simplified Chinese downloaded from an online bank, I have tried latin1, I have tried iso-8859-1, I have tried cp1252, all to no avail.

    But pd.read_csv("",encoding ='gbk') simply does the work.

提交回复
热议问题