-2

In the bottom right corner it says utf-8 codec can't decode byte 0x92 in position 12: invalid start byte. What does this mean?

enter image description here

Traceback

enter image description here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
shiff desta
  • 31
  • 1
  • 4
  • Please post the code and not an image of it. Welcome to SO! Please take the tour: https://stackoverflow.com/tour. SO is not for tutorials. What have you already tried, and what didn't work? Please read How to Ask more generally. https://meta.stackoverflow.com/questions/334822/how-do-i-ask-and-answer-homework-questions – David Jun 15 '20 at 18:55
  • 1
    it means that your data is encoded with a different encoding than `utf-8`. Try to specify another encoding when reading the data in `read_csv`, e.g. `endcoding='latin-1'` – Stef Jun 15 '20 at 18:56
  • Please close this duplicate of [UnicodeDecodeError when reading CSV file in Pandas with Python](https://stackoverflow.com/questions/18171739/unicodedecodeerror-when-reading-csv-file-in-pandas-with-python) – Trenton McKinney Jun 15 '20 at 19:00

1 Answers1

0

Try to change the encoding value of read_csv like so:

df = pd.read_csv("my.csv", encoding="latin-1")

The encoding you use should be the same one used by the csv. Here is a list of Python supported encodings.

Samuel
  • 378
  • 1
  • 9