xray.DataArray.reindex

DataArray.reindex(copy=True, **coordinates)

Conform this object onto a new set of coordinates or pandas.Index objects, filling in missing values with NaN.

Parameters:

copy : bool, optional

If copy=True, the returned array’s dataset contains only copied variables. If copy=False and no reindexing is required then original variables from this array’s dataset are returned.

**coordinates : dict

Dictionary with keys given by dimension names and values given by arrays of coordinate labels. Any mis-matched coordinates values will be filled in with NaN, and any mis-matched coordinate names will simply be ignored.

Returns:

reindexed : DatasetArray

Another dataset array, with replaced coordinates.

See also

DatasetArray.reindex_like, align