I am trying to read a non-English .csv file in python but I am facing an encoding error. Can you please help me to solve this problem?
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xae in position 53587: invalid start byte
Code used:
import pandas as pd
with open('1.csv', encoding="utf-8") as f:
train = f.read().splitlines()
print(train)
Actually i think your file encoding is inappropriate. I used below code for many Persian csv files and it works!