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)
n_values = data.income.value_counts()
First unique value count
n_at_most_50k = n_values[0]
Second unique value count
n_greater_50k = n_values[1] n_values
Output:
<=50K 34014 >50K 11208 Name: income, dtype: int64
n_greater_50k,n_at_most_50k:- (11208, 34014)