Python

TIL: Counting values in Pandas

Currently working on a project in Python that requires aggregating data. This code returns a Pandas series:

 pandas.value_counts(df['name'].values)

Going further, you can filter the series to only show values with a certain count:

 pandas.value_counts(df['name'].values)[pandas.value_counts(df['name'].values) > 3]