Skip to content

Commit 75a0cd4

Browse files
committed
fix cntry_mapper
1 parent 7758078 commit 75a0cd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lectures/heavy_tails.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@ def extract_wb(varlist=['NY.GDP.MKTP.CD'],
800800
801801
if varnames is not None:
802802
df.columns = variable_names
803-
803+
804+
cntry_mapper = pd.DataFrame(wb.economy.info().items)[['id','value']].set_index('id').to_dict()['value']
804805
df.index = df.index.map(lambda x: cntry_mapper[x]) #map iso3c to name values
805806
806807
return df

0 commit comments

Comments
 (0)