AttributeError: module 'pandas' has no attribute 'read_excel'

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fibonacci2015/article/details/79988170
data = pd.read_excel(case_file , index_col = 'time' )

报错:

Traceback (most recent call last):
  File "/Users/allin/PycharmProjects/scientific_calculation/resource_analysis/case_abnormal.py", line 9, in <module>
    data = pd.read_excel(case_file, 'sheet0')
AttributeError: module 'pandas' has no attribute 'read_excel'
环境用的anaconda3,python36
之前能用,突然就用不了了。更新了lib包,也不好使。重启pycharm也不行。
然后突然发现,项目里面有一个包,叫pandas,是空包。在import的时候,会优先导入项目里面的包,然后就报错了。

猜你喜欢

转载自blog.csdn.net/fibonacci2015/article/details/79988170