counting the number of a value in series in python code example Example: relativefrequencies of the unique values pandas df.value_counts(normalize=True)