Hi and thank you for visiting my post.
Here is working code that produces the median values
Wall_Median = pd.pivot_table(cleaned_pokedex, values="Wall", index ='Primary Type',aggfunc={"Wall": np.median})
Final_Wall_Median = Wall_Median.nlargest(18,'Wall')
print(Final_Wall_Median)
E.g Poison is 193 and the bar chart shows over 200
1. Wall Primary Type Steel 259.0 Fairy 244.0 Dragon 237.0 Rock 235.5 Ground 235.0 Ice 230.0 Flying 220.0 Fighting 216.0 Ghost 215.0 Psychic 215.0 Grass 209.5 Water 208.0 Fire 204.0 Electric 201.0 Dark 200.0 Normal 194.0 Poison 193.0 Bug 180.0
Plotting the values using a seaborn bar chart does not produce the numeric value I receive from the code
fig = plt.gcf()
fig.set_size_inches(20,18)
ax = sns.barplot(x= cleaned_pokedex["Wall"],y= cleaned_pokedex["Primary Type"],data= Final_Wall_Median,palette = pkmn_type_colors)
The bar values don't represent the medians printed. What can I do to fix this ?