numExt function
The numExt function returns a string containing only the numerical characters of the input string. If more than one number is present, numbers are delimited by a separator decided by the user (by default "-").
Parameters
numExt(column, onlyint, separator)
If you are using continuous attributes, check the Flow Execution Parameters.
Parameter | Description |
---|---|
column | The nominal attribute used to evaluate the numeric extraction. If it is not nominal, it will be casted to nominal upon function’s computation. The column parameter is mandatory. |
onlyint | If it is True, or not specified, only integer values will be extracted, while if it is False, also continuous values will be extracted. |
separator | The separator used in case of multiple number extraction. It is '-' as default. |
Example
The following example uses the Bike sales dataset.
Description | Screenshot |
---|---|
In this example, we want to create a new attribute, filled with the ages of the Age_Group attribute. Add a new attribute, which we have called age, and type the following formula:
and the attribute will be filled with the numbers only. |