polars arg-unique

For dataframe.

Returns indexes for unique values.

warning This command requires a plugin The polars arg-unique command resides in the polars plugin. To use this command, you must install and register nu_plugin_polars. See the Plugins chapter in the book for more information.

Command Type

plugin

Signature

> polars arg-unique {flags}

Input/output types:

input output
polars_dataframe polars_dataframe
polars_lazyframe polars_lazyframe

Examples

Returns indexes for unique values

> [1 2 2 3 3] | polars into-df | polars arg-unique
╭───┬────────────╮
│ # │ arg_unique │
├───┼────────────┤
│ 0 │          0 │
│ 1 │          1 │
│ 2 │          3 │
╰───┴────────────╯

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.