ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd
You can install openpyxl using pip install openpyxl
and then try:
pd.read_excel('2018_pressures.xlsx', engine='openpyxl')
This is an alternative solution but it will work.
Having trouble with opening Excel file with Pandas
Very short description. It would be nice if the description was a little more detailed. Try install the module:
pip install xlrd
If using python3 then:
pip3 install xlrd
If you are using conda:
conda install -c anaconda xlrd
May be there are multiple python versions in the system, where requirement might be satisfied for one and not for the other. I faced such problem and python3
rather than pip3
worked for me. Check out this too.
python3 -m pip install xlrd
Then it must work, otherwise, upgrade.
pip3 install --upgrade pandas
pip3 install --upgrade xlrd
I hope this will work.
import xlrd
import pandas as pd
sp = pd.ExcelFile("data.xlsx")
print(sp.parse(sp.sheet_names[0]))
If it doesn't work even after the upgrade, my guess is that there is another problem that is not known from your description. (Please include the full error message in the description as a code block, not in image format.)
Related Topics
Export Pandas Dataframe into a Pdf File Using Python
How to Run External Executable Using Python
How to Make a Roll the Dice Command With My Discord Bot
Spark Equivalent of If Then Else
How to Continue a Loop After Catching Exception in Try ... Except
Pandas: Subtracting Two Date Columns and the Result Being an Integer
Parentheses and Quotation Marks in Output
How to Save All the Variables in the Current Python Session
Remove Partial String from Dataframe With Pandas
How to Call a Django Function on Button Click
How to Increase Dpi With Opencv
How to Find Rows of One Dataframe in Another Dataframe
Saving the Output of a Python Program
How to Remove All Characters Before a Specific Character in Python
How to Put a Space Between Two String Items in Python