0

I am trying to plot the columns of the DataFrame which contains variable Edition in x-axis and Performances in y-axis.

enter image description here

I tried this code:

df.plot(x='Edition',y='Performances')

But it gives an error:

no numeric data to plot.

Can someone please suggest how I could do this?

3
  • I don't think pandas can plot categorical values on the y axis. You can use matplotlib, plt.plot(df["Edition"].values, df["Performances"].values). Commented Apr 8, 2019 at 14:03
  • This is a very similar question to this: stackoverflow.com/q/31029560/1930737 Commented Apr 8, 2019 at 15:04
  • Thanks a lot.!! It worked. Commented Apr 9, 2019 at 7:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.