xarray.Dataset.drop_duplicates

xarray.Dataset.drop_duplicates#

Dataset.drop_duplicates(dim, *, keep='first')[source]#

Returns a new Dataset with duplicate dimension values removed.

Parameters
  • dim (dimension label or labels) – Pass to drop duplicates along all dimensions.

  • keep ({"first", "last", False}, default: "first") – Determines which duplicates (if any) to keep. - "first" : Drop duplicates except for the first occurrence. - "last" : Drop duplicates except for the last occurrence. - False : Drop all duplicates.

Returns

Dataset