I'm looking to produce a weighted value of the following variable: df.satisfaction.value_counts() Satisfied 74 Dissatified 33 Don't know 4 Name: satisfaction, dtype: int64 I've used the groupby function as follows: df.groupby('satisfaction').agg('sum') However, this outputs all of the variables. Is there a way of selecting just the weight variable? Is there an alternative that I should know about? Continue reading...