The find function looks for a value within a column and returns True or False.
find(column, value, binary, ischarlist, charpos)
If you are using continuous attributes, check the Flow Execution Parameters.
The nominal attribute where the value will be searched. If it is not nominal, it will be casted to nominal upon function’s computation. The column parameter is mandatory.
The value to be searched in the column. If it is not nominal, it will be casted to nominal upon function’s computation. The value parameter is mandatory.
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).
If it is False, or not specified, only the value as a block will be considered, while if it is True, all the fonts in the value will be considered separately.
If it is =0, True is returned if the value is present in the column. If charpos is >0 the function returns in each row the position of the value within the column if it is present in it, otherwise the function returns an empty cell.
The following example uses the Adult dataset.
In this example, we want to find the Bachelors value in the Education attribute.
Add a new attribute, called find, and type the following formula:
As we didn’t specify the binary and ischarlist parameters (we want to keep the default options), we needed to write
The function returns a 1 when the Bachelors value is found, or an empty cell when the value is not present in the corresponding row.