I\'m trying to create a new df from my existing df. The new df is basically the count of unique values: Example my original df is below (df) and I\'m creating a new df called df