cycquery.ops.ConditionStartsWithΒΆ
- class ConditionStartsWith(col, string, not_=False, binarize_col=None, **cond_kwargs)[source]ΒΆ
Bases:
QueryOp
Filter rows based on starting with some string.
- Parameters:
col (str) β Column name on which to condition.
string (any) β String.
not (bool, default=False) β Take negation of condition.
binarize_col (str, optional) β If specified, create a Boolean column of name binarize_col instead of filtering.
**cond_kwargs (
Any
) β Optional keyword arguments for processing the condition.
Examples
>>> ConditionStartsWith("col1", "a")(table) >>> ConditionStartsWith("col1", "a", binarize_col="col1_bool")(table)
Methods