xray.DataArray.indexed

DataArray.indexed(**indexers)

Return a new DataArray whose dataset is given by indexing along the specified dimension(s).