xarray.Index.rename

Contents

xarray.Index.rename#

Index.rename(name_dict, dims_dict)[source]#

Maybe update the index with new coordinate and dimension names.

This method should be re-implemented in subclasses of Index if it has attributes that depend on coordinate or dimension names.

By default (if not re-implemented), it returns the index itself.

Warning: the input names are not filtered for this method, they may correspond to any variable or dimension of a Dataset or a DataArray.

Parameters
Returns

renamed (Index) – Index with renamed attributes.