问题:
在使用pandas来读取csv文件的时候,报错:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 0: invalid continuation byte
解决方案:
使用
read_csv('file',encoding = "ISO-8859-1")
或者
read_csv('file',encoding = "utf-8")
来读取
没有用耶,不知道为什么换成了这个就好了
df = pd.read_csv('file_name.csv',engine = 'python')