I have a data frame that looks something like this.
     NAME   NUMBER
1    A      3
2    B      4
3    A      7
4    B      1
And I want it to look like
     NAME   NUMBER
1    A      10
2    B      5
What's the easiest way to do this for a data frame with 4932 rows?
 
    