counts the value of categorical columns pandas code example Example: frequency unique pandas df.stack().value_counts()