NumPy

Previous topic

numpy.char.rindex

Next topic

numpy.char.str_len

This is documentation for an old release of NumPy (version 1.18). Read this page in the documentation of the latest stable release (version 2.2).

numpy.char.startswith

numpy.char.startswith(a, prefix, start=0, end=None)

Returns a boolean array which is True where the string element in a starts with prefix, otherwise False.

Calls str.startswith element-wise.

Parameters
aarray_like of str or unicode
prefixstr
start, endint, optional

With optional start, test beginning at that position. With optional end, stop comparing at that position.

Returns
outndarray

Array of booleans

See also

str.startswith