numpy.char.partition¶
-
numpy.char.
partition
(a, sep)¶ Partition each element in a around sep.
Calls str.partition element-wise.
For each element in a, split the element as the first occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 strings containing the string itself, followed by two empty strings.
- Parameters
- aarray_like, {
str
, unicode} Input array
- sep{
str
, unicode} Separator to split each string element in a.
- aarray_like, {
- Returns
See also