'utf-8' codec can't decode byte 0xa0 in position 4276: invalid start byte

前端 未结 4 695
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 07:54

I try to read and print the following file: txt.tsv (https://www.sec.gov/files/dera/data/financial-statement-and-notes-data-sets/2017q3_notes.zip)

According to the S

4条回答
  •  孤街浪徒
    2020-12-05 08:50

    Encoding in the file is 'windows-1252'. Use:

    open('txt.tsv', encoding='windows-1252')
    

提交回复
热议问题