Drop duplicated rows
Description
Drop duplicated rows
Usage
<DataFrame>$unique(subset = NULL, ..., keep = "any", maintain_order = FALSE)
Arguments
subset
|
A character vector with the names of the column(s) to use to identify
duplicates. If NULL (default), use all columns.
|
…
|
Not used. |
keep
|
Which of the duplicate rows to keep:
|
maintain_order
|
Keep the same order as the original data. Setting this to
TRUE makes it more expensive to compute and blocks the
possibility to run on the streaming engine.
|
Value
DataFrame
Examples
#> [1] 10
#> [1] 5
#> shape: (3, 2)
#> ┌─────┬─────┐
#> │ x ┆ y │
#> │ --- ┆ --- │
#> │ i32 ┆ i32 │
#> ╞═════╪═════╡
#> │ 2 ┆ 2 │
#> │ 3 ┆ 1 │
#> │ 1 ┆ 1 │
#> └─────┴─────┘
#> shape: (3, 2)
#> ┌─────┬─────┐
#> │ x ┆ y │
#> │ --- ┆ --- │
#> │ i32 ┆ i32 │
#> ╞═════╪═════╡
#> │ 2 ┆ 2 │
#> │ 1 ┆ 1 │
#> │ 3 ┆ 3 │
#> └─────┴─────┘
#> shape: (2, 2)
#> ┌─────┬─────┐
#> │ x ┆ y │
#> │ --- ┆ --- │
#> │ i32 ┆ i32 │
#> ╞═════╪═════╡
#> │ 3 ┆ 1 │
#> │ 1 ┆ 3 │
#> └─────┴─────┘