daft.Expression.str.find#
- Expression.str.find(substr: str | daft.expressions.expressions.Expression) Expression [source]#
Returns the index of the first occurrence of the substring in each string
Note
The returned index is 0-based. If the substring is not found, -1 is returned.
Example
>>> col("x").str.find("foo")
- Returns:
an Int64 expression with the index of the first occurrence of the substring in each string
- Return type:
Expression