AI engineering glossary · NumPy pandas visualization

What is value_counts?

value_counts: A Series method that counts how many times each distinct value appears and returns the counts sorted from most to least frequent. With normalize=True it returns proportions. It is often the first check of a categorical column.

Level: beginnerTopic: NumPy pandas visualization

value_counts: an example

df['city'].value_counts() might show Bengaluru 420, Pune 310, Chennai 270.

Related terms

More NumPy pandas visualization terms

Where you learn it

value_counts is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.