You are viewing documentation about an older version (1.18.0). View latest version

modin.pandas.DataFrame.notna¶

DataFrame.notna()[source]¶

Detect non-missing values for an array-like object.

This function takes a scalar or array-like object and indicates whether values are valid (not missing, which is NaN in numeric arrays, None or NaN in object arrays, NaT in datetimelike).

Parameters:

obj (array-like or object value) – Object to check for not null or non-missing values.

Returns:

  • bool or array-like of bool

  • For scalar input, returns a scalar boolean. For array input, returns an array of boolean indicating whether

  • each corresponding element is valid.

Example

>>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df
     0     1    2
0  ant   bee  cat
1  dog  None  fly
>>> df.notna()
      0      1     2
0  True   True  True
1  True  False  True
>>> df.notnull()
      0      1     2
0  True   True  True
1  True  False  True
Copy