pyarrow.compute.ReplaceSubstringOptions#

class pyarrow.compute.ReplaceSubstringOptions(pattern, replacement, *, max_replacements=None)#

Bases: pyarrow._compute._ReplaceSubstringOptions

Options for replacing matched substrings.

Parameters
patternstr

Substring pattern to look for inside input values.

replacementstr

What to replace the pattern with.

max_replacementsint or None, default None

The maximum number of strings to replace in each input value (unlimited if None).

__init__(self, pattern, replacement, *, max_replacements=None)#

Methods

__init__(self, pattern, replacement, *[, ...])

deserialize(buf)

Deserialize options for a function.

serialize(self)

static deserialize(buf)#

Deserialize options for a function.

Parameters
bufBuffer

The buffer containing the data to deserialize.

serialize(self)#