我正在尝试通过以下方式使用Pandas读取Excel文件:
dataSet = pd.read_excel(xlsPath, encoding = 'utf-8')
但是出现了这个错误:
UnicodeEncodeError: 'charmap' codec can't encode character '\xa4' in position 15353: character maps to <undefined>
我有什么办法可以解决这个问题?
PS那是我正在处理的Excel文件
这是一种直接下载东西并传递的方法?raw=true
。对我来说很好!
import pandas as pd
url = 'https://github.com/Amarthgul/PersonalCodes/blob/master/EDUTL1902/Data.xlsx?raw=true'
df = pd.read_excel(url, encoding='utf-8')
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句