W3cubDocs

/Nushell

dfr replace-all for dataframe

Replace all (sub)strings by a regex pattern.

Signature

> dfr replace-all {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

> [abacabacabac] |dfr into-df|dfr replace-all-pa-rA
╭───┬──────╮
# │  0   │
├───┼──────┤
0AbAc
1AbAc
2AbAc
╰───┴──────╯

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

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/dfr_replace-all.html