Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

wrap for filters

Wrap the value into a column.

Signature

> wrap {flags} (name)

Parameters

  • name: The name of the column.

Input/output types:

inputoutput
anyrecord
list<any>table
rangetable

Examples

Wrap a list into a table with a given column name

> [ Pachisi Mahjong Catan Carcassonne ] | wrap game
╭───┬─────────────╮
│ # │    game     │
├───┼─────────────┤
│ 0 │ Pachisi     │
│ 1 │ Mahjong     │
│ 2 │ Catan       │
│ 3 │ Carcassonne │
╰───┴─────────────╯

Wrap a range into a table with a given column name

> 4..6 | wrap num
╭───┬─────╮
│ # │ num │
├───┼─────┤
│ 0 │   4 │
│ 1 │   5 │
│ 2 │   6 │
╰───┴─────╯