Pd.read_csv: Utf-8' Codec Can't Decode Byte 0x98 In Position 61: Invalid Start Byte
I want to download a csv file from: https://www.osha.gov/fatalities/reports/archive. Please try the FY15 one. My code is like: a=pd.read_csv('C://.../fy15_federal-state_summarie
Solution 1:
It is encoding
issue.
You need to find out the correct encoding of the file.
In this case it is 1250
, so:
a=pd.read_csv(r'C:\...\fy15_federal-state_summaries.csv',encoding = "1250")
Post a Comment for "Pd.read_csv: Utf-8' Codec Can't Decode Byte 0x98 In Position 61: Invalid Start Byte"