count values per category in pandas code example
Example 1: number of times a value occurs in dataframne
df['a'].value_counts()
Example 2: count values python
from collections import Counter
values=np.ones(10)
Counter(values)
df['a'].value_counts()
from collections import Counter
values=np.ones(10)
Counter(values)