pyarrow.compute.split_pattern

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

Split string according to separator.

Split each string according to the exact 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.