| red | blue | winner|
|:------|:-----:|------:|
0 |70.0 |67.0 |Red |
1 |74.0 |76.0 |Red |
2 |75.0 |75.0 |Red |
3 |63.0 |61.0 |Blue |
4 |68.0 |72.0 |Blue |
In a pandas DataFrame how would I add up the red and blue columns only when they are the winner which is shown on the winner column.
so in this example
- red = 70 + 74 + 75
- and blue = 61 + 72