Roll this index by an offset along one or more dimensions. This method can be re-implemented in subclasses of Index, e.g., when the index can be itself indexed. If not re-implemented, this method returns ``None``, i.e., calling :py:meth:`Dataset.roll` will either dr
(self, shifts: Mapping[Any, int])
| 391 | raise NotImplementedError() |
| 392 | |
| 393 | def roll(self, shifts: Mapping[Any, int]) -> Self | None: |
| 394 | """Roll this index by an offset along one or more dimensions. |
| 395 | |
| 396 | This method can be re-implemented in subclasses of Index, e.g., when the |
| 397 | index can be itself indexed. |
| 398 | |
| 399 | If not re-implemented, this method returns ``None``, i.e., calling |
| 400 | :py:meth:`Dataset.roll` will either drop the index in the resulting |
| 401 | dataset or pass it unchanged if its corresponding coordinate(s) are not |
| 402 | rolled. |
| 403 | |
| 404 | Parameters |
| 405 | ---------- |
| 406 | shifts : mapping of hashable to int, optional |
| 407 | A dict with keys matching dimensions and values given |
| 408 | by integers to rotate each of the given dimensions, as passed |
| 409 | :py:meth:`Dataset.roll`. |
| 410 | |
| 411 | Returns |
| 412 | ------- |
| 413 | rolled : Index |
| 414 | A new index with rolled data. |
| 415 | """ |
| 416 | return None |
| 417 | |
| 418 | def rename( |
| 419 | self, |
no outgoing calls