本文主要是介绍ython报错 UnicodeDecodeError: ‘gbk‘ codec can‘t decode,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
这里写自定义目录标题
尝试1
file = open(path, encoding='gbk')
file = pd.read_csv(path, encoding='gbk')
尝试2
file = open(path, encoding='gb18030')
file = pd.read_csv(path, encoding='gb18030')
终极
file = open(path, encoding='gb18030', errors='ignore')
file = pd.read_csv(path, encoding='gb18030',error_bad_lines=False)
这篇关于ython报错 UnicodeDecodeError: ‘gbk‘ codec can‘t decode的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!