xarray.Coordinates.drop_vars#

Coordinates.drop_vars(names, *, errors='raise')[source]#

Drop variables from this Coordinates object.

Note that indexes that depend on these variables will also be dropped.

Parameters:
  • names (hashable or iterable or callable()) – Name(s) of variables to drop. If a callable, this is object is passed as its only argument and its result is used.

  • errors ({"raise", "ignore"}, default: "raise") – Error treatment.

    • 'raise': raises a ValueError error if any of the variable passed are not in the dataset

    • 'ignore': any given names that are in the dataset are dropped and no error is raised.