drop_indexes

UnitsAwareDataArray.drop_indexes(coord_names: Hashable | Iterable[Hashable], *, errors: ErrorOptions = 'raise') Self

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

Return type:

DataArray