how to find the count of occurance of a categorical variable in panada code example Example: frequency unique pandas df.stack().value_counts()