Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support

前端 未结 15 2133
太阳男子
太阳男子 2021-02-01 12:04

I am trying to read a .xlsx with pandas, but get the follwing error:

data = pd.read_excel(low_memory=False, io=\"DataAnalysis1/temp1.xlsx\").fillna(         


        
15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-01 12:20

    I was getting an error

    "ImportError: Install xlrd >= 1.0.0 for Excel support"

    on Pycharm for below code

    import pandas as pd
    df2 = pd.read_excel("data.xlsx")
    print(df2.head(3))
    print(df2.tail(3))
    

    Solution : pip install xlrd

    It resolved error after using this. Also no need to use "import xlrd"

提交回复
热议问题