xarray.DataArray.drop_vars
xarray.DataArray.drop_vars#
- DataArray.drop_vars(names, *, errors='raise')[source]#
Returns an array with dropped variables.
- Parameters
names (
Hashableor iterable ofHashable) – Name(s) of variables to drop.errors (
{"raise", "ignore"}, default:"raise") – If ‘raise’, raises a ValueError error if any of the variable passed are not in the dataset. If ‘ignore’, any given names that are in the DataArray are dropped and no error is raised.
- Returns
dropped (
Dataset) – New Dataset copied from self with variables removed.