isInteger function

The isInteger function checks whether the data type of the attribute specified in the string parameter is an integer.


Parameters

isInteger(string, binary)

Parameter

Description

string

The nominal attribute to be tested. The string parameter is mandatory.

binary

If the optional binary parameter is True, or not specified, results will be provided as Booleans (True/False), while if it is False, results will be provided in binary form (1/0).

The binary parameter values (True/False) are case sensitive.

Integer type valid formats (if the values aren’t this format, the function will return a False or 0).

  • 45;

  • -44


Example

The following example uses the Bike Sales dataset.

Description

Screenshot

In this example, we want to check if the Age_Group attribute is an Integer attribute.

We add a new attribute and write the following formula:

isInteger($"Age_Group")

We didn’t specify the binary parameter, as we want our results to be displayed in Booleans.