I have two data frames (Action, Comedy). Action contains two columns (year, rating) ratings columns contains average rating with respect to year. The Comedy data frame contains the same two columns with different mean values.
I merged both data frames into a
total_year data frame.
The output of
Now, I would like to plot
total_year on a line graph in which the X axis should contain the year column and the Y axis should contain both the action and the comedy columns.
I can plot only 1 column at a time on Y axis using following code:
total_year[-15:].plot(x='year', y='action' ,figsize=(10,5), grid=True)
How can I plot both columns on the Y axis?
I took this photo from google just to let you know guys I want to draw graph in this way: