xarray.Dataset.dropna

Dataset.dropna(self, dim: Hashable, how: str = 'any', thresh: int = None, subset: Iterable[Hashable] = None)

Returns a new dataset with dropped labels for missing values along the provided dimension.

Parameters
  • dim (Hashable) – Dimension along which to drop missing values. Dropping along multiple dimensions simultaneously is not yet supported.

  • how ({'any', 'all'}, optional) –

    • any : if any NA values are present, drop that label

    • all : if all values are NA, drop that label

  • thresh (int, default None) – If supplied, require this many non-NA values.

  • subset (iterable of hashable, optional) – Which variables to check for missing values. By default, all variables in the dataset are checked.

Returns

Return type

Dataset