DESCRIPTIONS[file_format]+‘; not supported‘)xlrd.biffh.XLRDError: Excel xlsx file; not supported

前言

在使用pandas读取excel文件的时候,pycharm报错,但是使用jupyter没有问题

代码

import pandas as pd

df_excel = pd.read_excel('E:\\.....\\hello\\1.xlsx')

print(df_excel)

jupyter运行结果

DESCRIPTIONS[file_format]+‘; not supported‘)xlrd.biffh.XLRDError: Excel xlsx file; not supported_第1张图片

pycharm报错信息

raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

解决方法

我在pycharm里面使用的是虚拟环境,所以在Anaconda的虚拟环境中,安装pyexcel-xls和pyexcel-xlsx

pip install pyexcel-xls
pip install pyexcel-xlsx

你可能感兴趣的:(pycharm,python)