We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 585a66f commit fa191aeCopy full SHA for fa191ae
lectures/inflation_history.md
@@ -259,7 +259,7 @@ def process_df(df):
259
df = df[~df.index.duplicated(keep='first')]
260
261
# Convert attribute values to numeric
262
- df = df.applymap(lambda x: float(x) \
+ df = df.map(lambda x: float(x) \
263
if x != '—' else np.nan)
264
265
# Finally, we only focus on data between 1919 and 1925
@@ -367,7 +367,7 @@ for i in range(4):
367
# Apply process_entry on the selected sheet
368
sheet_list = [
369
pd.read_excel(xls, 'Table3.' + str(ind),
370
- header=1).iloc[:row].applymap(process_entry)
+ header=1).iloc[:row].map(process_entry)
371
for ind, row in zip(indices, rows)]
372
373
sheet_list = [process_df(df) for df in sheet_list]
0 commit comments