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
> let a = ([[a b]; [1 2] [3 4]] | 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
> let a = ([[a b]; [1 2] [3 4]] | 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