熊猫读不到Excel

阿玛斯·古尔

我正在尝试通过以下方式使用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文件

安东vBR

这是一种直接下载东西并传递的方法?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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章