polars.LazyFrame.unique

LazyFrame.unique(maintain_order: bool = True, subset: Optional[Union[str, List[str]]] = None, keep: str = 'first') polars.internals.lazy_frame.LDF

Drop duplicate rows from this DataFrame. Note that this fails if there is a column of type List in the DataFrame or subset.

Parameters
maintain_order

Keep the same order as the original DataFrame. This requires more work to compute.

subset

Subset to use to compare rows

keep

any of {“first”, “last”}

Returns
DataFrame with unique rows