larray.Axis.containing

Axis.containing(substring) LGroup[source]

Return a group with all the labels containing the specified substring.

Parameters
substringstr or Group

The substring to search for.

Returns
LGroup

Group containing all the labels containing the substring.

Examples

>>> people = Axis(['Bruce Wayne', 'Bruce Willis', 'Arthur Dent'], 'people')
>>> people.containing('Will')
people['Bruce Willis']