larray.Axis.startingwith

Axis.startingwith(prefix) LGroup[source]

Return a group with the labels starting with the specified string.

Parameters
prefixstr or Group

The prefix to search for.

Returns
LGroup

Group containing all the labels starting with the given string.

Examples

>>> people = Axis(['Bruce Wayne', 'Bruce Willis', 'Waldo', 'Arthur Dent', 'Harvey Dent'], 'people')
>>> people.startingwith('Bru')
people['Bruce Wayne', 'Bruce Willis']