pandas 图表画不出

如图,路径难道不是按照上面的吗,为什么导不出,图3.4是教程里面的,路径为何不同,问题是,按照教程的路径我也导不出
pandas图表画不出

pandas图表画不出

pandas图表画不出

pandas图表画不出

讨论数量: 5
Jason990420

The read_excel() method can read Excel 2003 (.xls) files using the xlrd Python module. Excel 2007+ (.xlsx) files can be read using either xlrd or openpyxl. Binary Excel (.xlsb) files can be read using pyxlsb. The to_excel() instance method is used for saving a DataFrame to Excel. Generally the semantics are similar to working with csv data. See the cookbook for some advanced strategies.

xlrd is a library for reading data and formatting information from Excel files, whether they are .xls or .xlsx files.

pip install xlrd solved the problem.

Maybe also install xlwt openpyxl xlsxwriter if other actions required.

3年前 评论

ImportError不是提示缺少xlrd依赖库么。安装一下应该就可以解决了。

3年前 评论

照我所看,有可能是还没安装xlrd,在cmd输入pip3 install xlrd

然后在jupyter里面import xlrd
如果我没记错是要这样,我自己是读csv 的,所以显示的时候会使用pandas显示,然后再使用matplotlib工具画图

3年前 评论

首先查看你 pip 对应的 site-package:!pip3 -V 然后 !pip3 list 会发现没有 xlrd 之后安装这个 !pip3 install xlrd 然后在代码块前面加上 import xlrd

3年前 评论
Jason990420

可以的话,请单击 “最佳解决方案” 以表示问题已解决! : )

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!