xlrd.biffh.XLRDError: Excel xlsx file; not supported报错
生活随笔
收集整理的這篇文章主要介紹了
xlrd.biffh.XLRDError: Excel xlsx file; not supported报错
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
xlrd.biffh.XLRDError: Excel xlsx file; not supported報錯
**原因是最近xlrd更新到了2.0.1版本,只支持.xls文件。所以pandas.read_excel(‘xxx.xlsx’)會報錯。
可以安裝舊版xlrd,在cmd中運行:
pip uninstall xlrd
pip install xlrd==1.2.0
也可以用openpyxl代替xlrd打開.xlsx文件:
df=pandas.read_excel(‘data.xlsx’,engine=‘openpyxl’)**
轉載來源:https://blog.csdn.net/weixin_44073728/article/details/111054157
總結
以上是生活随笔為你收集整理的xlrd.biffh.XLRDError: Excel xlsx file; not supported报错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: pip install jupyter报
- 下一篇: 用pandas填充时间序列缺失值