美文网首页
Excel xlsx file; not supported

Excel xlsx file; not supported

作者: 白鬓少年 | 来源:发表于2021-03-10 10:11 被阅读0次

通过xlrd库去连接Excel时出现,‘Excel xlsx file; not supported’, 原因是xlrd在1.2v后就移除了对"xlsx"格式的支持,参考:xlrd.biffh.XLRDError: Excel xlsx file; not supported [duplicate]

解决方案一:

使用openpyxl库去连接"xlsx"格式文件,代码跟换为:
df_x = pd.ExcelFile(excle_file, engine='openpyxl')

解决方案二:

用回老版本的xlrd。

相关文章

网友评论

      本文标题:Excel xlsx file; not supported

      本文链接:https://www.haomeiwen.com/subject/pntwqltx.html