access value count in dataframe python 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)