This is the current structure of my data:
Area | Item | Element | Year1 | Year2 |
---|---|---|---|---|
Africa | Enteric | CH4 | 2 | 3 |
Africa | Enteric | C02 | 1.5 | 2 |
Africa | Manure | CH4 | 3 | 1 |
Africa | Manure | CO2 | 0.5 | 2 |
Europe | Enteric | CH4 | 2.5 | 2 |
Europe | Enteric | C02 | 1.7 | 2.3 |
Europe | Manure | CH4 | 3 | 4 |
Europe | Manure | CO2 | 1.5 | 1.5 |
I however want to sum "Years" by "Area" and "Item" such that my new that structure is like below:
Area | Item | Year1 | Year2 |
---|---|---|---|
Africa | Enteric | 3.5 | 5 |
Africa | Manure | 3.5 | 3 |
Europe | Enteric | 4.2 | 4.3 |
Europe | Manure | 4.5 | 5.5 |