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