MCPcopy
hub / github.com/pydata/xarray / first

Method first

xarray/core/groupby.py:1498–1517  ·  view source on GitHub ↗

Return the first 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 eithe

(
        self, skipna: bool | None = None, keep_attrs: bool | None = None
    )

Source from the content-addressed store, hash-verified

1496 return result
1497
1498 def first(
1499 self, skipna: bool | None = None, keep_attrs: bool | None = None
1500 ) -> T_Xarray:
1501 """
1502 Return the first element of each group along the group dimension
1503
1504 Parameters
1505 ----------
1506 skipna : bool or None, optional
1507 If True, skip missing values (as marked by NaN). By default, only
1508 skips missing values for float dtypes; other dtypes either do not
1509 have a sentinel missing value (int) or ``skipna=True`` has not been
1510 implemented (object, datetime64 or timedelta64).
1511 keep_attrs : bool or None, optional
1512 If True, ``attrs`` will be copied from the original
1513 object to the new one. If False, the new object will be
1514 returned without attributes.
1515
1516 """
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

Calls 1

_first_or_lastMethod · 0.95