MCPcopy
hub / github.com/pandas-dev/pandas / notna

Method notna

pandas/core/series.py:6348–6392  ·  view source on GitHub ↗

Detect existing (non-missing) values. Return a boolean same-sized Series indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings ``''`` or :attr:`numpy.inf` are not considered NA values. NA values, such as

(self)

Source from the content-addressed store, hash-verified

6346
6347 # error: Cannot determine type of 'notna'
6348 def notna(self) -> Series:
6349 """
6350 Detect existing (non-missing) values.
6351
6352 Return a boolean same-sized Series indicating if the values are not NA.
6353 Non-missing values get mapped to True. Characters such as empty
6354 strings ``''`` or :attr:`numpy.inf` are not considered NA values.
6355 NA values, such as None or :attr:`numpy.NaN`, get mapped to False
6356 values.
6357
6358 Returns
6359 -------
6360 Series
6361 Mask of bool values for each element in Series that
6362 indicates whether an element is not an NA value.
6363
6364 See Also
6365 --------
6366 Series.isna : Detect missing values.
6367 DataFrame.isna : Detect missing values.
6368 Series.isnull : Alias of isna.
6369 DataFrame.isnull : Alias of isna.
6370 DataFrame.notna : Boolean inverse of isna.
6371 DataFrame.notnull : Alias of notna.
6372 Series.dropna : Omit axes labels with missing values.
6373 DataFrame.dropna : Omit axes labels with missing values.
6374 notna : Top-level notna.
6375
6376 Examples
6377 --------
6378 Show which entries in a Series are not NA.
6379
6380 >>> ser = pd.Series([5, 6, np.nan])
6381 >>> ser
6382 0 5.0
6383 1 6.0
6384 2 NaN
6385 dtype: float64
6386 >>> ser.notna()
6387 0 True
6388 1 True
6389 2 False
6390 dtype: bool
6391 """
6392 return super().notna()
6393
6394 # error: Cannot determine type of 'notna'
6395 @doc(NDFrame.notna, klass=_shared_doc_kwargs["klass"])

Callers 15

test_isnaMethod · 0.95
value_counts_internalFunction · 0.45
map_arrayFunction · 0.45
_highlight_betweenFunction · 0.45
_highlight_valueFunction · 0.45
no_nansFunction · 0.45
no_nansFunction · 0.45
test_validMethod · 0.45
test_convert_dtypesMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_isnaMethod · 0.76
no_nansFunction · 0.36
no_nansFunction · 0.36
test_validMethod · 0.36
test_convert_dtypesMethod · 0.36
test_multigroupMethod · 0.36
test_join_on_innerMethod · 0.36
_check_joinFunction · 0.36