xarray.Dataset.dropna#
- Dataset.dropna(dim, how='any', thresh=None, subset=None)[source]#
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"}
, default:"any"
) –any : if any NA values are present, drop that label
all : if all values are NA, drop that label
thresh (
int
orNone
, optional) – If supplied, require this many non-NA values (summed over all the subset variables).subset (iterable of hashable or
None
, optional) – Which variables to check for missing values. By default, all variables in the dataset are checked.
- Returns: