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 │
├───┼───┼───┼─────┼─────┤
01212
13434
╰───┴───┴───┴─────┴─────╯

Appends a dataframe merging at the end of columns

>leta= ([[ab]; [12] [34]] |dfr into-df);
$a|dfr append$a--col
╭───┬───┬───╮
# │ a │ b │
├───┼───┼───┤
012
134
212
334
╰───┴───┴───╯

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