larray.LGroup.endingwith

LGroup.endingwith(suffix) LGroup

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

Parameters
suffixstr or Group

The suffix to search for.

Returns
LGroup

Group containing all the labels ending with the given string.

Examples

>>> from larray import Axis
>>> people = Axis(['Bruce Wayne', 'Bruce Willis', 'Arthur Dent'], 'people')
>>> group = people.startingwith('Bru')
>>> group
people['Bruce Wayne', 'Bruce Willis']
>>> people.endingwith('yne')
people['Bruce Wayne']