INTEGER
- INTEGER(value)[source]
Converts a value or expression to an INTEGER or INTEGER_ARRAY.
This function converts the provided input to an integer type.
- Parameters:
value (
Operand|bool|float|str) –The input to convert. Can be a scalar or a model object.
Supported types:
BOOLEAN,
BOOLEAN_ARRAY,
DECIMAL,
DECIMAL_ARRAY,
STRING,
STRING_ARRAY,
- Return type:
- Returns:
A formula object of type INTEGER or INTEGER_ARRAY representing the converted value.
Supported types:
INTEGER
INTEGER_ARRAY
- Raises:
ValueError – If the input value is not a supported type or model object.
Examples
INTEGER(3.7) # Returns 3 INTEGER(True) # Returns 1