+2 votes
in Programming Languages by (73.8k points)

I am getting an error "ImportError: Install xlrd >= 1.0.0 for Excel support" when I use pandas to read a spreadsheet.

My code is below:

import pandas as pd

df = pd.read_excel("data.xlsx")

How to fix it? 

1 Answer

+1 vote
by (349k points)
selected by
 
Best answer

From the error, it seems that your system does not have xlrd >= 1.0.0. Try to install the package using the following command and hopefully it will solve the problem.

Python 2

pip install xlrd

Python 3

pip3 install xlrd


...