textConcat function in the Factory

The textConcat function returns the concatenation of all the strings in a column.


Parameters

textConcat(column,separator,group)

Parameter

Description

column

The nominal attribute used to evaluate the text concatenation. The column parameter is mandatory.

It can also be defined as a list, and in this case the function returns per each row the concatenated strings of the attributes listed.

If it is not nominal, it will be casted to nominal upon function’s computation.

separator

The customized separator to be used in the concatenation.

group

The attribute used to divide the column in groups; The group parameter can also be defined as a list.

If the column parameter is defined as a list, then the group parameter is ignored.


Example

The following example uses the Adult dataset.

Description

Screenshot

In this example, we want to concatenate the strings of 2 attributes, and separated by a dash.

To achieve this goal we’re going to use the following formula:

textConcat(($"age","education"),"-")

If you only define the education attribute as column parameter, all the strings contained in that column will be concatenated in each row.