I have created a DataFrame, and now need to count each duplicate row (by for example df['Gender']. Suppose Gender 'Male' occurs twice and Female three times, I need this column to be made:
Gender Occurrence
Male 1
Male 2
Female 1
Female 2
Female 3
Is there a way to do this with Pandas?