Problem:
I got an error when I tried to open a product.xls with pd.read_excel ("NDC database file - Excel version (zip format)" downloaded from https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory)
df_product = pd.read_excel("tmp/Presentaciones.xls")
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/pandas/util/_decorators.py", line 299, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pandas/io/excel/_base.py", line 336, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "/usr/local/lib/python3.9/site-packages/pandas/io/excel/_base.py", line 1071, in __init__
ext = inspect_excel_format(
File "/usr/local/lib/python3.9/site-packages/pandas/io/excel/_base.py", line 965, in inspect_excel_format
raise ValueError("File is not a recognized excel file")
ValueError: File is not a recognized excel file
MY env:
pandas version: 1.2.4
xlrd version: 2.0.1
openpyxl version: 3.0.7
Thanks in advance.
read_csv