Python Forum

Full Version: I am trying to read a pandas file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
while reading a csv file i get a error like this
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 127: invalid start byte

How to clear this error
what does the open statement look like?
usually you can use something like:
with open(filename, 'r', encoding="UTF-8"):
    ... 
if that doesn't help, try:
with open(filename, 'r', encoding="ISO-8859-1"):
    ...