pyarrow.compute.replace_substring¶
-
pyarrow.compute.
replace_substring
(strings, *, memory_pool=None, options=None, pattern, replacement, max_replacements=- 1)¶ Replace non-overlapping substrings that match pattern by replacement.
For each string in strings, replace non-overlapping substrings that match pattern by replacement. If max_replacements != -1, it determines the maximum amount of replacements made, counting from the left. Null values emit null.
- Parameters
strings (Array-like or scalar-like) – Argument to compute function
memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.
options (pyarrow.compute.ReplaceSubstringOptions, optional) – Parameters altering compute function semantics
**kwargs (optional) – Parameters for ReplaceSubstringOptions constructor. Either options or **kwargs can be passed, but not both at the same time.