异常:Excel xlsx file; not supported
原因:xlrd更新至2.0.1版本后只支持xls文件,所以使用pandas.read_excel(‘file_name.xlsx’)会出现报错。
解决方法:
使用pandas.read_excel(‘file_name.xlsx’,engine=‘openpyxl’)
Python Pandas库不支持Excel文件读取,报错Excel xlsx file; not supported
最新推荐文章于 2025-05-07 15:49:31 发布
当尝试使用pandas的read_excel函数读取xlsx文件时,由于xlrd库仅支持xls格式,会导致'Excelxlsxfile;notsupported'错误。为解决此问题,可以指定使用openpyxl引擎,如:pandas.read_excel('file_name.xlsx', engine='openpyxl')。
4万+

被折叠的 条评论
为什么被折叠?



