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