Pandas和xlrd读取xls报错解决方法

xlrd错误信息:

Unsupported format, or corrupt file: Expected BOF record; found b'

pandas错误信息:

ValueError: File is not a recognized excel file

解决方法:

文件是嵌套的html文件

import pandas as pd

df = pd.read_html(r"C:\Users\admin\Downloads\XXXX.xls")[0]

你可能感兴趣的:(错误解决,pandas,python,数据分析)