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:
(
self,
name_dict: Mapping[Any, Hashable],
dims_dict: Mapping[Any, Hashable],
)
| 416 | return None |
| 417 | |
| 418 | def rename( |
| 419 | self, |
| 420 | name_dict: Mapping[Any, Hashable], |
| 421 | dims_dict: Mapping[Any, Hashable], |
| 422 | ) -> Self: |
| 423 | """Maybe update the index with new coordinate and dimension names. |
| 424 | |
| 425 | This method should be re-implemented in subclasses of Index if it has |
| 426 | attributes that depend on coordinate or dimension names. |
| 427 | |
| 428 | By default (if not re-implemented), it returns the index itself. |
| 429 | |
| 430 | Warning: the input names are not filtered for this method, they may |
| 431 | correspond to any variable or dimension of a Dataset or a DataArray. |
| 432 | |
| 433 | Parameters |
| 434 | ---------- |
| 435 | name_dict : dict-like |
| 436 | Mapping of current variable or coordinate names to the desired names, |
| 437 | as passed from :py:meth:`Dataset.rename_vars`. |
| 438 | dims_dict : dict-like |
| 439 | Mapping of current dimension names to the desired names, as passed |
| 440 | from :py:meth:`Dataset.rename_dims`. |
| 441 | |
| 442 | Returns |
| 443 | ------- |
| 444 | renamed : Index |
| 445 | Index with renamed attributes. |
| 446 | """ |
| 447 | return self |
| 448 | |
| 449 | def copy(self, deep: bool = True) -> Self: |
| 450 | """Return a (deep) copy of this index. |
no outgoing calls