xarray.DataArray.cf.rename_like#

DataArray.cf.rename_like(other, skip=None)#

Rename variables in object to match names of like-variables in other.

“Likeness” is determined by variables sharing similar attributes. If cf_xarray can identify a single “longitude” variable in both this object and other, that variable will be renamed to match the “longitude” variable in other.

For now, this function only matches ("latitude", "longitude", "vertical", "time")

Parameters:
otherDataArray, Dataset

Variables will be renamed to match variable names in this xarray object.

skipstr, Iterable[str], optional

Limit the renaming excluding (“axes”, “bounds”, cell_measures”, “coordinates”, “standard_names”) or a subset thereof.

Returns:
DataArray or Dataset

With renamed variables.