pandas无法read,已经根据网上说的把含pandas的文件名全部改过了还是不行,Series....
>>> import pandas as gh>>> data=gh.Read_excle('C:\\Users\\Administrator\\Desktop\\123.xls')
Traceback (most recent call last):
File "<pyshell#668>", line 1, in <module>
data=gh.Read_excle('C:\\Users\\Administrator\\Desktop\\123.xls')
File "D:\python\lib\site-packages\pandas\__init__.py", line 258, in __getattr__
AttributeError: module 'pandas' has no attribute 'Read_excle' 是read_excel,你就没写对 import pandas as pd
data=pd.read_excel('C:\\Users\\Administrator\\Desktop\\123.xls')
一般缩写都会写pd。。。。。。
read_excel没拼对 疾风怪盗 发表于 2020-9-21 18:52
一般缩写都会写pd。。。。。。
read_excel没拼对
import pandas as gh
>>> data=gh.read_excel('C:\\Users\\Administrator\\Desktop\\123.xls')
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
data=gh.read_excel('C:\\Users\\Administrator\\Desktop\\123.xls')
File "D:\python\lib\site-packages\pandas\util\_decorators.py", line 296, in wrapper
return func(*args, **kwargs)
File "D:\python\lib\site-packages\pandas\io\excel\_base.py", line 304, in read_excel
io = ExcelFile(io, engine=engine)
File "D:\python\lib\site-packages\pandas\io\excel\_base.py", line 867, in __init__
self._reader = self._engines(self._io)
File "D:\python\lib\site-packages\pandas\io\excel\_xlrd.py", line 21, in __init__
import_optional_dependency("xlrd", extra=err_msg)
File "D:\python\lib\site-packages\pandas\compat\_optional.py", line 110, in import_optional_dependency
raise ImportError(msg) from None
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
请问,错到这种地步还有救吗,需要卸载重装吗? 归榆 发表于 2020-9-21 19:22
import pandas as gh
>>> data=gh.read_excel('C:\%users\\Administrator\\Desktop\\123.xls')
Traceba ...
英文翻译一下啊,这个错误是因为你打开的xls,让你安装xlrd,你安装不就好了么
页:
[1]