w3resource
Pandas Tutorial

Pandas: Series - count() function

Count null observations in Pandas series

The count() function is used to get number of non-NA/null observations in the Series.

Syntax:

Series.count(self, level=None)

Parameters:

Name Description Type/Default Value Required / Optional
level If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a smaller Series. int or level name
Default Value: None
Required

Returns: int or Series (if level specified)
Number of non-null values in the Series.

Example:


Download the above Notebook from here.