w3resource

Pandas Series: notna() function

Detect existing values in Pandas series

The notna() function is used to detect existing (non-missing) values.

Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy.NaN, get mapped to False values.

Syntax:

Series.notna(self)
Pandas Series notna image

Returns: Series- Mask of bool values for each element in Series that indicates whether an element is not an NA value.

Example:


Download the above Notebook from here.



Inviting useful, relevant, well-written and unique guest posts