Spec-Zone.ru › Nushell

roll left for filters

Roll record or table columns left.

Signature

> roll left {flags}

Flags

  • --by, -b {int}: Number of columns to roll.
  • --cells-only, -c: Rotates columns leaving headers fixed.

Input/output types:

input output
record record
table table

Examples

Rolls columns of a record to the left

> {a:1 b:2 c:3} | roll left
╭───┬───╮
│ b │ 2 │
│ c │ 3 │
│ a │ 1 │
╰───┴───╯

Rolls columns of a table to the left

> [[a b c]; [1 2 3] [4 5 6]] | roll left
╭───┬───┬───┬───╮
│ # │ b │ c │ a │
├───┼───┼───┼───┤
│ 0 │ 2 │ 3 │ 1 │
│ 1 │ 5 │ 6 │ 4 │
╰───┴───┴───┴───╯

Rolls columns to the left without changing column names

> [[a b c]; [1 2 3] [4 5 6]] | roll left --cells-only
╭───┬───┬───┬───╮
│ # │ a │ b │ c │
├───┼───┼───┼───┤
│ 0 │ 2 │ 3 │ 1 │
│ 1 │ 5 │ 6 │ 4 │
╰───┴───┴───┴───╯

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

Spec-Zone.ru

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