value.counts in python code example Example 1: value count in python col-name.value_count() Example 2: frequency unique pandas df.stack().value_counts()