larray.LGroup.endingwith

LGroup.endingwith(self, suffix)

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

Parameters:
suffix : str 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']