Например, эта таблица:
list_1=[['2010','20-30',0.2],
['2010','31-40',0.35],
['2010','41-50',0.47,],
['2010','51-60',0.21,],
['2011','20-30',0.23,],
['2011','31-40',0.42,],
['2011','41-50',0.55,],
['2011','51-60',0.19,],
['2012','20-30',0.36,],
['2012','31-40',0.24,],
['2012','41-50',0.71,],
['2012','51-60',0.12,]]
labels=['Year','Age_group','Order_Rate']
df=pd.DataFrame(list_1,columns=labels)
df
Вывод:
Year Age_group Order_Rate
0 2010 20-30 0.20
1 2010 31-40 0.35
2 2010 41-50 0.47
3 2010 51-60 0.21
4 2011 20-30 0.23
5 2011 31-40 0.42
6 2011 41-50 0.55
7 2011 51-60 0.19
8 2012 20-30 0.36
9 2012 31-40 0.24
10 2012 41-50 0.71
11 2012 51-60 0.12
Мне нужно сделать линейный график, где x_axis = Year, y_axis = Order_Rate и каждая линия тренда цвета этой Age_Group