I have a dataset with 3 columns: Category, Country, and Count (which is always 1 - and is pretty useless, actually).
What I want to achieve is something like the yellow column here:
I could do a simple group by in python, but that's not what I want, because I want to preserve the individual rows of the data, different from the image below (that groups them):
I just wanted to get the frequency based on both columns, without grouping it, any idea? I thought about iterating with for loops, but I couldn't, I'm kind of a beginner in python, so your help is deeply appreciated.