2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: dfr set
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
Sets value where given mask is true
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> dfr set (value) --mask```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
- `value`: value to be inserted in series
|
|
|
|
- `--mask {any}`: mask indicating insertions
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Shifts the values by a given period
|
|
|
|
```shell
|
|
|
|
> let s = ([1 2 2 3 3] | dfr to-df | dfr shift 2);
|
|
|
|
let mask = ($s | dfr is-null);
|
|
|
|
$s | dfr set 0 --mask $mask
|
|
|
|
```
|