count number of each value in column pandas code example Example: pandas count all values in whole dataframe df.stack().value_counts()