The isAttribute function checks whether a specified attribute is present in the dataset. The result can either be returned as a Boolean (true/false) or binary (0/1) result.
This function is useful for large datasets.
The name of the attribute we are looking for. The name parameter is mandatory.
If set to True, or simply not specified, results will be provided as a Boolean (True/False), while if set to False, results will be provided in binary form (1/0).
The following example uses the adult dataset.
In the adult dataset, we have added a new attribute, called Present_in_dataset, where the results of the isAttribute function will be saved. We will then check to see whether there is an attribute called education in the dataset, with the formula
As we have not specified a value for the binary parameter, the results will be expressed as a Boolean value: True in this specific case.
If we wanted to receive the result in binary form instead of a True/False Boolean value, we would need to specify that the binary parameter should be False, with the following formula: