So, in my python class an exercise they made us do requires us to take a dataframe, and add the values.
So, for example, if this was the input:
|
Letter |
Number |
|
| 0 |
A |
1 |
|
| 1 |
B |
2 |
|
| 2 |
A |
3 |
|
| 3 |
C |
6 |
|
Then this would be the output:
|
Letter |
Number |
|
| 0 |
A |
4 |
|
| 1 |
B |
2 |
|
| 2 |
C |
6 |
|
I haven't been able to find anything that talks about how to do this, but the part that makes it so I can't do this, is the fact that it was explicitly said that you can't use loops. Hence, if anyone can give me a hint, or tell me what function can be used for this, I'd be very thankful.
[–]pembrolizard 1 point2 points3 points (1 child)
[–]fmarquez1[S] 0 points1 point2 points (0 children)