The suffix function considers the chosen value as suffix and returns the subsequent characters.
suffix(column, value, last)
If you are using continuous attributes, check the Flow Execution Parameters.
The nominal attribute containing the strings. If it is not nominal, it will be casted to nominal upon function’s computation. The column parameter is mandatory.
The substring value to be searched into the strings of the column. If value is not nominal, it will be casted to nominal upon function’s computation. The value parameter is mandatory.
The value parameter is case sensitive.
If False, or not specified, the function selects the first occurrence of the value within the string, while if it is True, the function selects the last occurrence of the value which has to be considered.
The following example uses the Adult dataset.
In this example, we want to retrieve as suffixes the characters after the i in the marital-status attribute.
Add a new attribute, which we have called suffix, and type the following formula:
As we didn’t specify the last parameter, the function considers as suffix all the characters after the first value (i in this example) occurrence.