pandas count of each value in column code example
Example 1: pandas count values by column
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()
Example 2: relativefrequencies of the unique values pandas
df.value_counts(normalize=True)