W3cubDocs

/Nushell

dfr drop-duplicates for dataframe

Drops duplicate values in dataframe.

Signature

> dfr drop-duplicates {flags} (subset)

Flags

  • --maintain, -m: maintain order
  • --last, -l: keeps last duplicate value (by default keeps first)

Parameters

  • subset: subset of columns to drop duplicates

Input/output types:

input output
any any

Examples

drop duplicates

> [[ab]; [12] [34] [12]] |dfr into-df|dfr drop-duplicates
╭───┬───┬───╮
# │ a │ b │
├───┼───┼───┤
034
112
╰───┴───┴───╯

Tips: Dataframe commands were not shipped in the official binaries by default, you have to build it with --features=dataframe flag

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/dfr_drop-duplicates.html