背景:
读取文件时发生该错误
解决办法:
改变encoding方式,把下列三种都试一遍
df=pd.read_csv(path,encoding='gbk')
df=pd.read_csv(path,encoding='utf-8')
df=pd.read_csv(path,encoding=''gb18030'')
读取文件时发生该错误
改变encoding方式,把下列三种都试一遍
df=pd.read_csv(path,encoding='gbk')
df=pd.read_csv(path,encoding='utf-8')
df=pd.read_csv(path,encoding=''gb18030'')
本文标题:UnicodeDecodeError: 'utf-8' code
本文链接:https://www.haomeiwen.com/subject/fmteektx.html
网友评论