已解决ImportError: Pandas requires version ‘2.0.1‘ or newer of ‘xlrd‘ (version ‘1.2.0‘ currently instal
已解决(pandas read_excel 读取Excel报错)ImportError: Pandas requires version ‘2.0.1‘ or newer of ‘xlrd‘ (version ‘1.2.0‘ currently installed).
文章目录
- 报错代码
- 报错翻译
- 报错原因
- 解决方法
- 帮忙解决
报错代码
粉丝群里面一个小伙伴用pandas
的 read_excel
读取Excel表格的时候报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错代码如下:
import pandas as pd
import xlwtdf = pd.read_excel('./test.xls', sheet_name='test')s1 = df["a"].describe()
s2 = df["b"].describe()
s3 = df["c"].describe()
s4 = df["d"].describe()
s5 = df["e"].describe()
s6 = df["f"].describe()all = pd.concat([s1, s2, s3, s4, s5, s6], axis=1, ignore_index=False)
print(all)
报错信息截图:
报错翻译
报错信息翻译:
严重错误:Pandas需要“xlrd”的版本“2.0.1”或更高版本(当前安装的版本为“1.2.0”)。
报错原因
报错原因:xlrd版本太低了,pandas的read_excel
底层调用的xlrd
库,小伙伴们执行下面的xrld模块升级命令即可
解决方法
用pip升级xlrd库,执行下面命令即可:
pip install --upgrade xlrd
升级后再次运行代码成功:
帮忙解决
本文已收录于:《告别Bug》专栏
本专栏用于记录学习和工作中遇到的各种疑难Bug问题,以及粉丝群里小伙伴提出的各种问题,文章形式:报错代码 + 报错翻译 + 报错原因 + 解决方法,包括程序安装、运行程序过程中等等问题,订阅专栏+关注博主后如遇到其他问题可私聊帮忙解决!!!
已解决ImportError: Pandas requires version ‘2.0.1‘ or newer of ‘xlrd‘ (version ‘1.2.0‘ currently instal相关推荐
- ImportError: Pandas requires version ‘2.0.1‘ or newer of ‘xlrd‘ (version ‘1.2.0‘ currently instal的问题
报错翻译 严重错误:Pandas需要"xlrd"的版本"2.0.1"或更高版本(当前安装的版本为"1.2.0") 解决办法 pip inst ...
- 解决 ImportError: HDFStore requires PyTables, No module named tables problem
解决 ImportError: HDFStore requires PyTables, "No module named 'tables'" problem importing 解 ...
- 已解决ImportError: DLL 1oad failed while importing, onnxruntime_pybind11_state: 参数错误。
已解决Python导包错误ImportError: DLL 1oad failed while importing, onnxruntime_pybind11_state: 参数错误. [1964] ...
- 已解决Python pandas.read_excel读取Excel文件报错
已解决(Python pandas.read_excel读取Excel文件报错)io = ExcelFile(io,storage_options=storage.options, engine=en ...
- 【已解决】CentOS 7 安装MySQL80报错:pkgconfig(openssl) is needed by mysql-community-devel-8.0.28-1.el7.x86_64
当我们在执行rpm -ivh mysql-community-devel-8.0.28-1.el7.x86_64.rpm提示: warning: mysql-community-devel-8.0.2 ...
- (2020.1.13已解决)ImportError: cannot import name 'StringIO'
20200206 更新 这个问题关注的人比较多,特地加一句. 这个问题基本可以确定是tushare和pandas版本匹配问题.因为tushare本身有调用pandas,随着tushare版本更新,其调 ...
- [已解决]为什么使用远程桌面无法打开雷电模拟器,OpenGL版本始终1.1.0?
今天也被这个问题困扰了,原因是Windows的mstsc连接方式默认不走显卡输出,你会发现OpenGL的版本始终是为1.1.0版本. 远程桌面并不是不能用 GPU,也不是不能输出游戏画面,只是很多游戏 ...
- (已解决)ImportError attempted relative import with no known parent package
想要调用同一目录下的另一个py文件中的类,以下或许是可行的解决方案. 需要做到两点 1. 将主调文件的名称改为__init__.py 2. from 被调文件的文件名称(删去末尾.py) import ...
- 已解决pandas创建DataFrame对象失败
已解决(pandas创建DataFrame对象失败)ValueError: Shape of passed values is (1509, 1), indices imply (1509, 2) 文 ...
- 已解决FutureWarning: The default value of regex will change from True to False in a future version. In
已解决(pandas使用正则表达式匹配报错)FutureWarning: The default value of regex will change from True to False in a ...
最新文章
- 源码阅读:SDWebImage(十九)——UIImage+ForceDecode/UIImage+GIF/UIImage+MultiFormat
- vim括号匹配跳转操作
- 函数式编程语言python-Python——五分钟理解函数式编程与闭包
- 微信系小程序 StorageSync
- python知识:函数abs、delattr、hash、memeryview、index
- vmware workstation 8上面装vsphere5
- windows2016服务器优化,Windows Server 2012 服务器优化图文方法
- 机器学习总结之第一章绪论
- php 上传图片 预览 多张,uploadify插件实现多个图片上传并预览
- 大学数学学习参考书点评
- 水经注地图下载器注册机机器码过长_微图影像下载参数说明
- QQ自动发送消息——维持群聊炽焰
- 新华linux桌面操作系统3.0
- 架构系列---QR二维码和扫描二维码登陆原理
- oracle 9i 启动监听报错误 TNS-12555: TNS:permission denied 解决
- np.percentile用法
- 三国杀移动版虎牢关模式神吕布技能是什么?
- 米的换算单位和公式_一米等于多少分米(常见的长度单位换算公式方法)
- A-Priori算法及其优化(FP树)
- 【MFC】Ribbon界面开发(一)