I have a dataframe like this:
values values_average gender Weeks_before_race
[0.0,21.2,2111.9...] 5.5 M -10
[0.6,4.33,67.8,...] 6.6 F -2
.
.
.
The weeks_before_race column begins at -25 weeks out. Each row represents individual and they can be either male or female. I want to plot - on a line graph - the average_values column beginning at -25 weeks out up to 0 weeks out. Below is a screenshot of what I have so far. I need to be able to plot this with one average line for Males and one average line for Females.
Edit I now have an output that looks like this:
gender weeks_before_race average
F -25 7.7
-24 10.11
.
.
.
-1 5.5
M -25 7.7
.
.
.
All I need to do is plot this data on a single graph, one line showing the average for males and the other line showing the average for females.