series value_counts function pass code example
Example 1: count_values in python
idx.value_counts()
Example 2: relativefrequencies of the unique values pandas
df.value_counts(normalize=True)
idx.value_counts()
df.value_counts(normalize=True)