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
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 | |