xarray.DataArray.drop_indexes#

DataArray.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 (DataArray) – A new dataarray with dropped indexes.