Skip to content Skip to sidebar Skip to footer

Create Seaborn Plot With Pandas Of Matplotlib

I'm struggling to (re)create a seaborn plot with pandas or matplotlib. DataFrame: wage = pd.melt(pd.read_html('https://en.wikipedia.org/wiki/List_of_countries_by_average_wage')[8].

Solution 1:

You can loop over the wage['Country']:

fig, ax = plt.subplots()forc, d in wage.groupby('Country'):
    ax.plot(d.Year, d.Wage, label=c)

plt.legend()

plt.show()

which gives:

enter image description here

Post a Comment for "Create Seaborn Plot With Pandas Of Matplotlib"