xarray.Dataset.drop_duplicates#
- Dataset.drop_duplicates(dim, *, keep='first')[source]#
Returns a new Dataset with duplicate dimension values removed.
- Parameters
dim (
dimension label
orlabels
) – 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
See also