xarray.core.groupby.DataArrayGroupBy.last

xarray.core.groupby.DataArrayGroupBy.last#

DataArrayGroupBy.last(skipna=None, keep_attrs=None)[source]#

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 do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool or None, optional) – If True, attrs will be copied from the original object to the new one. If False, the new object will be returned without attributes.