pitrou opened a new pull request #11955:
URL: https://github.com/apache/arrow/pull/11955
This makes compute functions easier to use, for example here the required
"pattern" option doesn't need to be passed by name:
```
>>> pc.split_pattern("abacab", "a")
<pyarrow.ListScalar: ['', 'b', 'c', 'b']>
```
... and producing the following doc at the prompt:
```
split_pattern(strings, /, pattern, *, max_splits=-1, reverse=False,
options=None, memory_pool=None)
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
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.
options : pyarrow.compute.SplitPatternOptions, optional
Parameters altering compute function semantics.
memory_pool : pyarrow.MemoryPool, optional
If not passed, will allocate memory from the default memory pool.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]