dfr replace for dataframe

Replace the leftmost (sub)string by a regex pattern.

Signature

> dfr replace {flags}

Flags

  • --pattern, -p {string}: Regex pattern to be matched
  • --replace, -r {string}: replacing string

Input/output types:

input output
any any

Examples

Replaces string

> [abc abc abc] | dfr into-df | dfr replace --pattern ab --replace 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