I have the following nested dictionary
players_info = {'Afghanistan': {'Asghar Stanikzai': 809.0,
'Mohammad Nabi': 851.0,
'Mohammad Shahzad': 1713.0,
'Najibullah Zadran': 643.0,
'Samiullah Shenwari': 774.0},
'Australia': {'AJ Finch': 1082.0,
'CL White': 988.0,
'DA Warner': 1691.0,
'GJ Maxwell': 822.0,
'SR Watson': 1465.0},
'England': {'AD Hales': 1340.0,
'EJG Morgan': 1577.0,
'JC Buttler': 985.0,
'KP Pietersen': 1176.0,
'LJ Wright': 759.0}}
And I want to visualize it in the following way.
I have tried to convert it into a dataframe and then visualize but I am getting errors.
from pandas.tools.plotting import parallel_coordinates
df_plot = pd.DataFrame(players_info).stack().reset_index()
df_plot.columns = ['Player Name', 'Country', 'Total Score']
parallel_coordinates(df_plot, class_column='Country')
Error
ValueError: could not convert string to float: 'Asghar Stanikzai'
Is there a way in matplotlib or in seaborn where I can plot such a plot or similar. Please note that I want a similar plot not exactly like the one i meantioned. The idea is to plot the nested dict data in a better understandable way. Also please note that the dict here is just a small dict but in real data i have slightly bigger dict. Any suggestions will be highly appreciated.