Skip to content

ExprStringNameSpace.starts_with

Same as polars.Expr.str.starts_with

Parameters:

Name Type Description Default
s str

The string to check if the expression starts with

required
Source code in pyquokka/expression.py
220
221
222
223
224
225
226
227
228
229
230
def starts_with(self, s):

    """
    Same as polars.Expr.str.starts_with

    Args:
        s (str): The string to check if the expression starts with
    """

    assert type(s) == str
    return Expression(self.expr.sqlglot_expr.like("{}*".format(s)))