pandas 1.4.2

ReturnsBackRef
isna(self) -> 'Series'

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

Returns

Series

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

Detect missing values.

See Also

Series.dropna

Omit axes labels with missing values.

Series.isnull

Alias of isna.

Series.notna

Boolean inverse of isna.

isna

Top-level isna.

Examples

Show which entries in a DataFrame are NA.

This example is valid syntax, but we were not able to check execution
>>> df = pd.DataFrame(dict(age=[5, 6, np.NaN],
...  born=[pd.NaT, pd.Timestamp('1939-05-27'),
...  pd.Timestamp('1940-04-25')],
...  name=['Alfred', 'Batman', ''],
...  toy=[None, 'Batmobile', 'Joker']))
... df age born name toy 0 5.0 NaT Alfred None 1 6.0 1939-05-27 Batman Batmobile 2 NaN 1940-04-25 Joker
This example is valid syntax, but we were not able to check execution
>>> df.isna()
     age   born   name    toy
0  False   True  False   True
1  False  False  False  False
2   True  False  False  False

Show which entries in a Series are NA.

This example is valid syntax, but we were not able to check execution
>>> ser = pd.Series([5, 6, np.NaN])
... ser 0 5.0 1 6.0 2 NaN dtype: float64
This example is valid syntax, but we were not able to check execution
>>> ser.isna()
0    False
1    False
2     True
dtype: bool
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

pandas.core.series.Series.dropna pandas.core.series.Series.isnull pandas.core.series.Series.notnull pandas.core.indexes.base.Index.isna pandas.core.series.Series.isna pandas.core.dtypes.missing.isna pandas.core.series.Series.notna

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/series.py#5276
type: <class 'function'>
Commit: