Getting the counts of values

The .count() method gives us the count of the non-NaN items in a Series.

Get Learning pandas - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.