BISHAL Adhikari
BISHAL Adhikari

Reputation: 31

pd.read_excel not able to read a xlsx file

I am trying to read an xlsx file using pd.read_excel but getting an error like this: Error

My code snippet looks like this: Notebook code

When i tried to open the xlsx file directly from notebook i got this error: opening xlsx file

PLease help me solve this issue.

Upvotes: 0

Views: 581

Answers (1)

Tim Roberts
Tim Roberts

Reputation: 54698

Your title says pd.read_excel, but your code says pd.read_csv. CSV files are plain text files, readable with Notepad. XLSX files are binary, and are not human-readable. If you have an XLSX file, then use pd.read_excel, like your title says.

Upvotes: 1

Related Questions