Lets say i have following dataframe df:
col1 col2
-------------
apple apple
melon apple
apple apple
pear melon
Now, how do i count all combinations and write it into a new column? Like this.
col1 col2 amount
---------------------
apple apple 2
melon apple 1
pear melon 1