pandas count values where by code example
Example 1: relativefrequencies of the unique values pandas
df.value_counts(normalize=True)
Example 2: count values python
from collections import Counter
values=np.ones(10)
Counter(values)
df.value_counts(normalize=True)
from collections import Counter
values=np.ones(10)
Counter(values)