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 Pandas Series Notebooks from here.
Previous: Compute correlation
Next: Compute covariance with Pandas Series
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework