I been trying this for the past hour but with little to no success
I was wondering how can I make this dataframe to a dictionary
DF
Country Continent
1 Europe
2 Europe
3 Asia
4 Australia
Desired
{'1': 'Europe',
'2': 'Europe',
'3': 'Asia',
'5': 'Australia'}
I tired like x10 different variations of code similar to this but it didn't work
df.set_index('Country', inplace=True)
df = df.to_dict('dict')