pandas get frequency of distinct values in column code example Example: frequency unique pandas df.stack().value_counts()