dfr replace
for dataframe
Replace the leftmost (sub)string by a regex pattern.
Signature
> dfr replace --pattern --replace
Parameters
--pattern {string}
: Regex pattern to be matched--replace {string}
: replacing string
Input/output types:
input | output |
---|---|
any | any |
Examples
Replaces string
> [abc abc abc] | dfr into-df | dfr replace -p ab -r AB
╭───┬─────╮
│ # │ 0 │
├───┼─────┤
│ 0 │ ABc │
│ 1 │ ABc │
│ 2 │ ABc │
╰───┴─────╯
Tips: Dataframe commands were not shipped in the official binaries by default, you have to build it with --features=dataframe
flag