I have a dataset
|category| cat a cat b cat a
I\'d like to be able to return something like (showing unique values and frequency)
df.apply(pd.value_counts).fillna(0)
value_counts - Returns object containing counts of unique values
apply - count frequency in every column. If you set axis=1, you get frequency in every row
axis=1
fillna(0) - make output more fancy. Changed NaN to 0