Returns a new object with renamed variables. Parameters ---------- name_dict : dict-like, optional Dictionary whose keys are current variable or coordinate names and whose values are the desired names. **names : optional Keyword fo
(
self,
name_dict: Mapping[Any, Hashable] | None = None,
**names: Hashable,
)
| 850 | return cast(Self, self.to_dataset().rename_dims(dims_dict, **dims).coords) |
| 851 | |
| 852 | def rename_vars( |
| 853 | self, |
| 854 | name_dict: Mapping[Any, Hashable] | None = None, |
| 855 | **names: Hashable, |
| 856 | ) -> Coordinates: |
| 857 | """Returns a new object with renamed variables. |
| 858 | |
| 859 | Parameters |
| 860 | ---------- |
| 861 | name_dict : dict-like, optional |
| 862 | Dictionary whose keys are current variable or coordinate names and |
| 863 | whose values are the desired names. |
| 864 | **names : optional |
| 865 | Keyword form of ``name_dict``. |
| 866 | One of name_dict or names must be provided. |
| 867 | |
| 868 | Returns |
| 869 | ------- |
| 870 | renamed : Coordinates |
| 871 | Coordinates object with renamed variables |
| 872 | """ |
| 873 | return cast(Self, self.to_dataset().rename_vars(name_dict, **names).coords) |
| 874 | |
| 875 | |
| 876 | class DatasetCoordinates(Coordinates): |