isType function in the Data functions of the Factory

The isType function checks whether the data type of the attribute specified in the string parameter corresponds to the data type specified in the type parameter.


Parameters

isType(string, type, binary)

Parameter

Description

string

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

type

The attribute type we want to verify on the string. The type 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.

Attribute types you can verify in this function:

  • Integer

  • Continuous

  • Binary

  • Percentage

  • Currency

  • Date

  • Datetime

  • Month

  • Week

  • Quarter


Example

The following example uses the Is functions dataset.

Description

Screenshot

In this example, we want to check if the Month attribute is an integer attribute.

Add a new attribute where we can use the isType function.

The function has returned False, because the attribute Month hasn’t got numeral values.