Spec-Zone.ru › Nushell

drop column for filters

Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`.

Signature

> drop column {flags} (columns)

Flags

  • --left, -l: Drop columns from the left.

Parameters

  • columns: Starting from the end, the number of columns to remove.

Input/output types:

input output
table table
record record

Examples

Remove the last column of a table

> [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column
╭───┬─────────╮
│ # │   lib   │
├───┼─────────┤
│ 0 │ nu-lib  │
│ 1 │ nu-core │
╰───┴─────────╯

Remove the last column of a record

> {lib: nu-lib, extension: rs} | drop column
╭─────┬────────╮
│ lib │ nu-lib │
╰─────┴────────╯

Remove the first column of a table

> [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column --left
╭───┬───────────╮
│ # │ extension │
├───┼───────────┤
│ 0 │ rs        │
│ 1 │ rb        │
╰───┴───────────╯

Remove the first column of a record

> {lib: nu-lib, extension: rs} | drop column --left
╭───────────┬────╮
│ extension │ rs │
╰───────────┴────╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/drop_column.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API