2
votes

I have been trying to upload a csv file using pandas .read() function. But as you can see from my title this is what I get "'utf-8' codec can't decode byte 0x92 in position 16: invalid start byte" And it's weird because from the same folder I was able to upload a different csv file without problems. Something that might have caused this is that the file was previously xlsx and I manually converted it to cvs? Please Help Python3

1
Never mind, I solved it by adding this pd.read_csv("filename.csv",encoding="Latin-1") - Stef

1 Answers

0
votes

Try the below:

pd.read_csv("filepath",encoding='cp1252').

This one should work as it worked for me.