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