IfElse / Logical Layer
Create a new column based on conditional logic, similar to numpy where(), pandas np.where(), or SQL CASE WHEN. Values are selected from true_value or false_value based on a boolean mask, with configurable null handling.
Example:
Index | Condition | Result (true=pass, false=fail) |
---|---|---|
0 | true | pass |
1 | false | fail |
2 | null | [depends on null_value] |
3 | true | pass |
4 | false | fail |
Common applications:
- Status mapping
- Conditional categorization
- Data transformation
- Binary decision handling
- Value replacement
SelectMask
columnThe boolean column used as condition mask. Determines which value (true or false) is selected for each row.
TrueValue
stringValue to use when condition is true. Must be compatible with AsDatatype
.
Examples:
- 'pass' for status
- '1' for binary flags
- 'high' for categories
FalseValue
stringValue to use when condition is false. Must be compatible with AsDatatype
.
Examples:
- 'fail' for status
- '0' for binary flags
- 'low' for categories
NullValue
oneofReplaceWith
stringReplace null values in the mask with this specific value. Provides consistent handling of nulls across all rows.
FillFrom
columnUse values from this column when mask is null. Allows dynamic null replacement based on existing data.
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.
AsDatatype
enumSpecifies the output data type for the new column. Enables type control for the conditional results.
8-bit signed integer (-128 to 127). For small-range discrete values.
16-bit signed integer (-32,768 to 32,767). For moderate-range whole numbers.
32-bit signed integer (-2^31 to 2^31-1). Common for general integer data.
64-bit signed integer (-2^63 to 2^63-1). For large whole numbers.
8-bit unsigned integer (0 to 255). For small positive numbers.
16-bit unsigned integer (0 to 65,535). For moderate positive ranges.
32-bit unsigned integer (0 to 4,294,967,295). For larger positive numbers.
64-bit unsigned integer (0 to 2^64-1). For very large positive numbers.
32-bit floating point. For decimal numbers with moderate precision.
64-bit floating point. For high-precision decimal numbers.
Text data type. Default type for flexible value representation.
Categorical string type. For efficient storage of repeated string values.
Boolean type. For true/false results.