xarray.IndexVariable.identical

IndexVariable.identical(other, equiv=<function array_equiv>)

Like equals, but also checks attributes.