我想用 read_csv 在pandas python中读取 csv 文件。我收到了这个错误:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 38: invalid start byte
此代码没有帮助:
with open('Data.csv', 'rb') as f:
result = chardet.detect(f.readline())
pd.read_csv('Data.csv', encoding=result['encoding'])