I am new to the "visualization in Pandas" world and I am trying to visualize a set of data as a scattered chart.
Initially my dataframe
looks like this:
country_code 'ABW' 'AFG' 'AGO' 'AIA' 'ALB'
0 0 0 0 43 106
1 10 10 100 50 100
I transposed it and I have the following dataframe df_transposed
:
kc0 kc1
country_code
'ABW' 0 10
'AFG' 0 10
'AGO' 0 100
'AIA' 43 50
'ALB' 106 100
I am now plotting this transposed dataframe
into a beautiful chart that works fine, but I would like to have the country_code
as a label on each point.
This is what I currently get by using:
df_transposed.plot.scatter(x='kc0', y='kc1')
Is it possible to add the country code as a label to all the dots in this chart?