I am exploring a rugby dataset where I am stuck on a bit of an issue. The dataset contains matches played in the the Six Nations over a year, and the tries are put into two separate columns, which is "Home try's" and "Away try's". I am trying to print out the output of the teams with the largest amount of try`s. Below is an example of how the dataset looks.
| Home | Away | Home try's | Away try's |
|---|---|---|---|
| England | France | 3 | 2 |
| Ireland | Scotland | 1 | 4 |
| France | Ireland | 1 | 0 |
| Scotland | England | 1 | 3 |
I have tried to put the home and away columns to a single column as a list and use the arguments df.explode and df.groupby argument to create a dataframe, but it doesnt work. Any tips on how I could solve this?
The ideal output would be:
| England | Scotland | France | Ireland |
|---|---|---|---|
| 6 | 5 | 3 | 1 |