Numpy has some very useful string operations, which vectorize the usual Python string operations.
Compared to these operation and to pandas.str, the num
pandas.str
To solve this, so far I've been transforming the numpy array to a pandas Series and back. It is not a pretty solution, but it works and it works relatively fast.
array
Series
a = numpy.array(['hello', 'how', 'are', 'you']) pandas.Series(a).str[1:3].values array(['el', 'ow', 're', 'ou'], dtype=object)