Return the last element of each group along the group dimension Parameters ---------- skipna : bool or None, optional If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either
(
self, skipna: bool | None = None, keep_attrs: bool | None = None
)
| 1517 | return self._first_or_last("first", skipna, keep_attrs) |
| 1518 | |
| 1519 | def last( |
| 1520 | self, skipna: bool | None = None, keep_attrs: bool | None = None |
| 1521 | ) -> T_Xarray: |
| 1522 | """ |
| 1523 | Return the last element of each group along the group dimension |
| 1524 | |
| 1525 | Parameters |
| 1526 | ---------- |
| 1527 | skipna : bool or None, optional |
| 1528 | If True, skip missing values (as marked by NaN). By default, only |
| 1529 | skips missing values for float dtypes; other dtypes either do not |
| 1530 | have a sentinel missing value (int) or ``skipna=True`` has not been |
| 1531 | implemented (object, datetime64 or timedelta64). |
| 1532 | keep_attrs : bool or None, optional |
| 1533 | If True, ``attrs`` will be copied from the original |
| 1534 | object to the new one. If False, the new object will be |
| 1535 | returned without attributes. |
| 1536 | |
| 1537 | |
| 1538 | """ |
| 1539 | return self._first_or_last("last", skipna, keep_attrs) |
| 1540 | |
| 1541 | def assign_coords(self, coords=None, **coords_kwargs): |
| 1542 | """Assign coordinates by group. |