how to get the count of a value in a column in pandas dataframe code example
Example 1: pandas count values by column
df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()
Example 2: count values python
from collections import Counter
values=np.ones(10)
Counter(values)