Logical functions

Logical functions are based on true or false conditions.

These functions are useful when you need to change the type of an attribute and you want to identify outliers.

Rulex Platform formula

Function

Formula

Description

ifelse

ifelse(condition, iftrue, iffalse)

Checks whether a specific condition is true, and returns the value of iftrue if the condition is true, otherwise it returns the value of iffalse if the condition is false.

ifNone

ifNone(column, condition, iftrue)

The ifNone function fills the attribute’s None values, which satisfy the specified condition, with the desired value. If the condition is not satisfied, the cell is left empty.

isDate

isDate(string, binary)

Checks whether the data type of the attribute specified in the string parameter is date.

isDatetime

isDatetime(string, binary)

Checks whether the data type of the attribute specified in the string parameter is datetime.

isFloat

isFloat(string, binary)

Checks whether the data type of the attribute specified in the string parameter is continuous.

isInteger

isInteger(string, binary)

Checks whether the data type of the attribute specified in the string parameter is integer.

isMonth

isMonth(string, binary)

Checks whether the data type of the attribute specified in the string parameter is month.

isQuarter

isQuarter(string, binary)

Checks whether the data type of the attribute specified in the string parameter is quarter.

isTime

isTime(string, binary)

Checks whether the data type of the attribute specified in the string parameter is time.

isType

isType(string, type, binary)

Checks whether the data type of the attribute specified in the string parameter corresponds to the data type specified in the type parameter.

isWeek

isWeek(string, binary)

Checks whether the data type of the attribute specified in the string parameter is week.

Parameters in bold are mandatory.