I have a large csv recorded as below.
name score year
team_a 4 2005
team_b 6 2005
team_a 2 2005
team_c 7 2005
team_d 3 2005
team_d 4 2005
team_a 2 2006
team_b 4 2006
team_b 3 2006
team_c 4 2006
team_c 2 2006
team_d 1 2006
team_e 5 2006
I would like to perform a downsample as below (add total scores of every year and have the recorded instead)
name total_score year
team_a 6 2005
team_b 6 2005
team_c 7 2005
team_d 7 2005
team_a 2 2006
team_b 7 2006
team_c 6 2006
team_d 1 2006
team_e 5 2006
Thoughts on this?