Count how many occurrences of value in a column

Question:

I have a dataset in Python and a column which lists the type of loan applicant (individual, couple, business etc) and i am trying to find out how many of each applicant there are. i am new to Python and this is probably a very basic question. any feedback is appreciated

i tried:

df['applicant_type'].count() = only provided the total number of data in column

df['applicant_type'].head()
df['applicant_type'].info()
df['applicant_type'].dict()

none of the above worked

Asked By: Dench

||

Answers:

Try:

df['applicant_type'].value_counts()
Answered By: gtomer
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.