Skip to main content
`Ctrl`+`K`

# pandas.api.extensions.ExtensionArray.isna

ExtensionArray.isna()

  A 1-D array indicating if each value is missing.

  This method returns a boolean array where `True` indicates that the corresponding value is missing (NA/NaN).

  Returns:
    numpy.ndarray or pandas.api.extensions.ExtensionArray

      In most cases, this should return a NumPy ndarray. For exceptional cases like `SparseArray`, where returning an ndarray would be expensive, an ExtensionArray may be returned.

  See also

  `ExtensionArray.dropna`

    Return ExtensionArray without NA values.

  `ExtensionArray.fillna`

    Fill NA/NaN values using the specified method.

  Notes

  If returning an ExtensionArray, then

  - `na_values._is_boolean` should be True

  - `na_values` should implement `ExtensionArray._reduce()`

  - `na_values` should implement `ExtensionArray._accumulate()`

  - `na_values.any`, `na_values.all`, `na_values.sum`, and `na_values.__invert__` should be implemented

  Examples

      >>> arr = pd.array([1, 2, np.nan, np.nan])
      >>> arr.isna()
      array([False, False,  True,  True])