type function

The type function returns the data type of the selected column as a nominal value.


Parameters

type(column)

Parameter

Description

column

The attribute whose data type we want to return. The column parameter is mandatory.


Example

The following example uses the adult dataset.

Description

Screenshot

In the adult dataset, we have added a new type attribute, where the data type of the education_num attribute has been retrieved, using the formula type($"education_num").

The data type has been correctly returned as integer (expressed as a nominal attribute as “integer “ is a string value.