const averageRating numVotes Sex Year 0 0015724 6.2 19 Women 1993 1 0035423 6.4 72338 Men 2001 2 0059900 6.8 21 Women 2018 ... ... ... ... ... ... 121314 9190404 9.9 7 Women 2019 121315 9209662 7.8 8 men 1999 121316 9226154 1.5 97 men 1986
This is a data table that showing average rate, sex, and year. And I want to see how average rating is
difference depends on musician's sex.
I'm supposed to use Pandas DataFrame in Python.
So, x-axis will be years and y-axis will be averageRating.
I want to make two lined graph one for women and one for men.
Plz help me how to populate each each gender and plot on corresponding datas.
#source code:

#source code in plain text:
import matplotlib.pyplot as plt
import pandas as pd
data=pd.read_csv("list.csv")
p=data.groupby("sex")
men=p.get_group("Men")
women=p.get_group("Women")
plt.plot(men["years"],men["averageRating"])
plt.plot(women["years"],women["averageRating"])
plt.xlabel("Years")
plt.ylabel("averageRating")
plt.show()
#list.csv file

#list.csv in plain text:
const,averageRating,numvotes,sex,years
0015724,6.2,19,Women,1993
0035423,6.4,72338,Men,2001
0059900,6.8,21,Women,2018
9190404,9.9,7,Women,2019
9209662,7.8,8,Men,1999
9226154,1.5,97,Men,1986
#output:

#if you have any doubts comment below...
const averageRating numVotes Sex Year 0 0015724 6.2 19 Women 1993 1 0035423 6.4 72338 Men...