eelbrain.Factor.startswith¶
-
Factor.
startswith
(self, substr)¶ An index that is true for all cases whose name starts with
substr
Parameters: - substr : str
String for selecting cells that start with substr.
Returns: - idx : boolean array, len = len(self)
Index that is true wherever the value starts with
substr
.
Examples
>>> a = Factor(['a1', 'a2', 'b1', 'b2']) >>> a.startswith('b') array([False, False, True, True], dtype=bool)