pandas.Series.isna#
- Series.isna()[source]#
Detect missing values.
Return a boolean same-sized Series indicating if the values are NA. NA values, such as None or
numpy.NaN, get mapped to True values. Everything else gets mapped to False values. Characters such as empty strings''ornumpy.infare not considered NA values.- Returns:
- Series
Mask of bool values for each element in Series that indicates whether an element is an NA value.
See also
DataFrame.isnaDetect missing values.
DataFrame.isnullAlias of isna.
Series.notnaBoolean inverse of isna.
DataFrame.notnaBoolean inverse of isna.
Series.notnullAlias of notna.
DataFrame.notnullAlias of notna.
Series.dropnaOmit axes labels with missing values.
DataFrame.dropnaOmit axes labels with missing values.
isnaTop-level isna.
Examples
Show which entries in a Series are NA.
>>> ser = pd.Series([5, 6, np.nan]) >>> ser 0 5.0 1 6.0 2 NaN dtype: float64 >>> ser.isna() 0 False 1 False 2 True dtype: bool