'Sum column based on two columns
Solution 1:[1]
Try something like:
df[df['Length Group'].isin(["10m&Under", "Over10m"])].pivot_table(values='Value(£)', index='Port of Landing', aggfunc='sum')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

