dfr set for dataframe

Sets value where given mask is true.

Signature

> dfr set {flags} (value)

Flags

  • --mask, -m {any}: mask indicating insertions

Parameters

  • value: value to be inserted in series

Input/output types:

input output
any any

Examples

Shifts the values by a given period

> let s = ([1 2 2 3 3] | dfr into-df | dfr shift 2);
    let mask = ($s | dfr is-null);
    $s | dfr set 0 --mask $mask
╭───┬───╮
│ # │ 0 │
├───┼───┤
│ 0 │ 0 │
│ 1 │ 0 │
│ 2 │ 1 │
│ 3 │ 2 │
│ 4 │ 2 │
╰───┴───╯

Tips: Dataframe commands were not shipped in the official binaries by default, you have to build it with --features=dataframe flag