-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
There seems to be some issue in the following code chunk:
# Import data
data_url = "https://raw.githubusercontent.com/QuantEcon/lecture-python-intro/main/lectures/datasets/chapter_3.xlsx"
xls = pd.ExcelFile(data_url)
# Select relevant sheets
sheet_index = [(2, 3, 4),
(9, 10),
(14, 15, 16),
(21, 18, 19)]
# Remove redundant rows
remove_row = [(-2, -2, -2),
(-7, -10),
(-6, -4, -3),
(-19, -3, -6)]
# Unpack and combine series for each country
df_list = []
for i in range(4):
indices, rows = sheet_index[i], remove_row[i]
# Apply process_entry on the selected sheet
sheet_list = [
pd.read_excel(xls, 'Table3.' + str(ind),
header=1).iloc[:row].map(process_entry)
for ind, row in zip(indices, rows)]
sheet_list = [process_df(df) for df in sheet_list]
df_list.append(pd.concat(sheet_list, axis=1))
df_aus, df_hun, df_pol, df_deu = df_list
The error note I receive is:
AttributeError: 'DataFrame' object has no attribute 'map'
We still need to figure out what is causing the problem.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working