eelbrain.Factor.endswith

Factor.endswith(substr)

An index that is true for all cases whose name ends with substr

Parameters:

substr (str) – String for selecting cells that end with substr.

Returns:

Index that is True for all cases whose label ends with substr.

Return type:

index

See also

startswith, matches

Examples

>>> a = Factor(['a1', 'a2', 'b1', 'b2'])
>>> a.endswith('1')
array([True, False,  True,  False], dtype=bool)