I have a csv file with this kind of data:
But I would like to have the columns Americas, Asia, Europe, Africa etc. with all the corresponding "vdem_corr" values under it.
How can I change this in python?
>Solution :
df = pd.read_csv(...)
df.pivot(columns='region', values='vdem_corr')
