isWord function
The isWord function checks whether a string (which can have a delimiter) is contained in an attribute or not.
Parameters
isWord(column, substring, delimiter, binary)
If you are using continuous attributes, check the Flow Execution Parameters.
Parameter | Description |
---|---|
column | The nominal attribute in which the substring will be checked. If it is not nominal, it will be casted to nominal upon function’s computation. The column parameter is mandatory. |
substring | The substring to be checked in the column. If it is not nominal, it will be casted to nominal upon function’s computation. The substring parameter is mandatory. The substring parameter is case sensitive. |
delimiter | The delimiter of the substring. If it is not specified, the delimiter is (space) as default. |
binary | If it is True, or not specified, results will be provided as Booleans (True/False), while if it is False, results will be provided in binary form (1/0). |
Example
The following example uses the supermarket_sales dataset.
Description | Screenshot |
---|---|
In this example, we want to check if the string ‘and’ is present in the Product line attribute. Add a new attribute, which we have called isword, and type the following formula:
As we didn’t specify the binary parameter, the results are provided as Booleans. The delimiter parameter hasn’t been specified. |