I have a df containing several columns, but two of them look like:
number output colour
1 1 green
2 1 red
3 1 orange
4 0 green
5 1 green
I need to find all possible combinations and the number of occurences there so I expect something like
1green 2
1red 1
1orange 1
0green 1
Using this python: Combination of two Columns I found all possible combinations, but I do not know how to do the sum. Or is there any solution to do it in one step?
THank you