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.


Series.count(self, level=None)
Pandas Series count image


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

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


Download the above Notebook from here.

Previous: Compute correlation
Next: Compute covariance with Pandas Series

Share this Tutorial / Exercise on : Facebook and Twitter