+2 votes
in Programming Languages by (51.1k 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

0 votes
by (157k points)

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