pandas and NumPy 3 · Loading and inspecting

Count each distinct value

Count how often each value occurs in a column.

df["country"].value_counts()

Official pandas and NumPy 3 documentation

More loading and inspecting commands

All loading and inspecting commands · pandas and NumPy 3 cheatsheet

Was this page helpful?