W3cubDocs

/Nushell

dfr append for dataframe

Appends a new dataframe.

Signature

> dfr append {flags} (other)

Flags

  • --col, -c: appends in col orientation

Parameters

  • other: dataframe to be appended

Input/output types:

input output
any any

Examples

Appends a dataframe as new columns

>leta= ([[ab]; [12] [34]] |dfr into-df);
$a|dfr append$a
╭───┬───┬───┬─────┬─────╮
│# │ a │ b │ a_x │ b_x │
├───┼───┼───┼─────┼─────┤
│0│1│2│1│2│
│1│3│4│3│4│
╰───┴───┴───┴─────┴─────╯

Appends a dataframe merging at the end of columns

>leta= ([[ab]; [12] [34]] |dfr into-df);
$a|dfr append$a--col
╭───┬───┬───╮
│# │ a │ b │
├───┼───┼───┤
│0│1│2│
│1│3│4│
│2│1│2│
│3│3│4│
╰───┴───┴───╯

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_append.html