pyarrow.compute.split_pattern_regex

pyarrow.compute.split_pattern_regex(strings, *, memory_pool=None, options=None, pattern, max_splits=- 1, reverse=False)

Split string according to regex pattern.

Split each string according to the regex pattern defined in SplitPatternOptions. The output for each string input is a list of strings.

The maximum number of splits and direction of splitting (forward, reverse) can optionally be defined in SplitPatternOptions.

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.SplitPatternOptions, optional) – Parameters altering compute function semantics.

  • pattern (optional) – Parameter for SplitPatternOptions constructor. Either options or pattern can be passed, but not both at the same time.

  • max_splits (optional) – Parameter for SplitPatternOptions constructor. Either options or max_splits can be passed, but not both at the same time.

  • reverse (optional) – Parameter for SplitPatternOptions constructor. Either options or reverse can be passed, but not both at the same time.