xarray.Dataset.drop_indexes

xarray.Dataset.drop_indexes#

Dataset.drop_indexes(coord_names, *, errors='raise')[source]#

Drop the indexes assigned to the given coordinates.

Parameters
  • coord_names (hashable or iterable of hashable) – Name(s) of the coordinate(s) for which to drop the index.

  • errors ({"raise", "ignore"}, default: "raise") – If ‘raise’, raises a ValueError error if any of the coordinates passed have no index or are not in the dataset. If ‘ignore’, no error is raised.

Returns

dropped (Dataset) – A new dataset with dropped indexes.