daft.functions.endswith#
endswith #
endswith(expr: Expression, suffix: str | Expression) -> Expression
Checks whether each string ends with the given suffix in a string column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | The expression to check. | required |
suffix | str | Expression | The suffix to search for as a literal string, or as a column to pick values from | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | a Boolean expression indicating whether each value ends with the provided suffix |
Examples:
1 2 3 4 | |
╭──────────┬───────╮
│ x ┆ match │
│ --- ┆ --- │
│ String ┆ Bool │
╞══════════╪═══════╡
│ geftdaft ┆ true │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ lazy ┆ false │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ daft.io ┆ false │
╰──────────┴───────╯
(Showing first 3 of 3 rows) Source code in daft/functions/str.py
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | |