Reputation: 366
I have a file with the name IE00BK1PV551_20210610.xlsx in the folder ETF. I try to read it to a data frame.
My code is:
import pandas as pd
pd.read_excel('ETF/IE00BK1PV551_20210610.xlsx')
It doesn't work for me. I get the following error:
AttributeError: 'ElementTree' object has no attribute 'getiterator'
How to solve the problem?
Upvotes: 0
Views: 1240
Reputation: 5648
From the docs, https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_excel.html, you may have to specify the engine
pd.read_excel('ETF/IE00BK1PV551_20210610.xlsx', engine='openpyxl') for new excel files
Upvotes: 1