W3cubDocs

/Nushell

dfr into-nu for dataframe

Converts a dataframe or an expression into into nushell value for access and exploration.

Signature

> dfr into-nu {flags}

Flags

  • --rows, -n {number}: number of rows to be shown
  • --tail, -t: shows tail rows

Input/output types:

input output
any any

Examples

Shows head rows from dataframe

> [[ab]; [12] [34]] |dfr into-df|dfr into-nu
╭───┬───┬───╮
# │ a │ b │
├───┼───┼───┤
012
134
╰───┴───┴───╯

Shows tail rows from dataframe

> [[ab]; [12] [56] [34]] |dfr into-df|dfr into-nu-t-n1
╭───┬───┬───╮
# │ a │ b │
├───┼───┼───┤
234
╰───┴───┴───╯

Convert a col expression into a nushell value

>dfr cola|dfr into-nu
╭───────┬────────╮
exprcolumn
valuea
╰───────┴────────╯

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_into-nu.html