我正在尝试使用 pandas 读取 .xlsx,但出现以下错误:data = pd.read_excel(low_memory=False, io=\'DataAnalysis1/temp1.xlsx\').fillna(value=0) Traceback (most recent call last): Fi...
我正在尝试使用 Pandas 读取 .xlsx
,但出现以下错误:
data = pd.read_excel(low_memory=False, io="DataAnalysis1/temp1.xlsx").fillna(value=0)
Traceback (most recent call last):
File "/Users/Vineeth/PycharmProjects/DataAnalysis1/try1.py", line 9, in <module>
data = pd.read_excel(low_memory=False, io="DataAnalysis1/temp1.xlsx").fillna(value=0)
File "/Users/Vineeth/venv/lib/python2.7/site-packages/pandas/util/_decorators.py", line 118, in wrapper
return func(*args, **kwargs)
File "/Users/Vineeth/venv/lib/python2.7/site-packages/pandas/io/excel.py", line 230, in read_excel
io = ExcelFile(io, engine=engine)
File "/Users/Vineeth/venv/lib/python2.7/site-packages/pandas/io/excel.py", line 263, in __init__
raise ImportError(err_msg)
ImportError: Install xlrd >= 0.9.0 for Excel support
我也尝试过
data = pd.read_excel("DataAnalysis1/temp1.xlsx", low_memory=False).fillna(value=0)
但我仍然遇到同样的错误。
背景:我正在尝试提取一个包含多个工作表的 excel 文件作为数据框的字典。我安装了 xlrd 版本 0.9.0 和最新版本 (1.1.0),但仍然出现相同的错误。谢谢!