Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ValueError: Unknown engine: openpyxl when trying to load Excel file to a dataframe on a Jupyternotebook

I'm getting this error: 'ValueError: Unknown engine: openpyxl' when I try to run this on a Jupyter Notebook:

import pandas as pd
df = pd.read_excel(r"C:\Users\XXX\YYY.xlsx", engine='openpyxl')

Already installed openpyxl with pip:

pip install openpyxl

'Requirement already satisfied: openpyxl in c:\users\XXX\appdata\local\programs\python\python37\lib\site-packages (3.0.9) Requirement already satisfied: et-xmlfile in c:\users\XXX\appdata\local\programs\python\python37\lib\site-packages (from openpyxl) (1.1.0) Note: you may need to restart the kernel to use updated packages.'

Already restarted the Kernel but the error persists.

Can someone help me here?

Thank you.

like image 443
Tito Avatar asked Sep 17 '25 20:09

Tito


1 Answers

Just exclude engine='openpyxl', and retry. Looks little bit weird, but it works for me.

import pandas as pd

df = pd.read_excel(r"C:\Users\XXX\YYY.xlsx")

like image 157
Steve Lee Avatar answered Sep 19 '25 10:09

Steve Lee