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:

IndexConditionResult (true=pass, false=fail)
0truepass
1falsefail
2null[depends on null_value]
3truepass
4falsefail

Common applications:

  • Status mapping
  • Conditional categorization
  • Data transformation
  • Binary decision handling
  • Value replacement
Table
0
0
Table

The boolean column used as condition mask. Determines which value (true or false) is selected for each row.

TrueValue

string

Value to use when condition is true. Must be compatible with AsDatatype. Examples:

  • 'pass' for status
  • '1' for binary flags
  • 'high' for categories

Value to use when condition is false. Must be compatible with AsDatatype. Examples:

  • 'fail' for status
  • '0' for binary flags
  • 'low' for categories
Propagate

Indicates that null values in the mask should propagate to the result.

Replace null values in the mask with this specific value. Provides consistent handling of nulls across all rows.

FillFrom

column

Use values from this column when mask is null. Allows dynamic null replacement based on existing data.

Name 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.

String

Specifies the output data type for the new column. Enables type control for the conditional results.

Int8 ~

8-bit signed integer (-128 to 127). For small-range discrete values.

Int16 ~

16-bit signed integer (-32,768 to 32,767). For moderate-range whole numbers.

Int32 ~

32-bit signed integer (-2^31 to 2^31-1). Common for general integer data.

Int64 ~

64-bit signed integer (-2^63 to 2^63-1). For large whole numbers.

Uint8 ~

8-bit unsigned integer (0 to 255). For small positive numbers.

Uint16 ~

16-bit unsigned integer (0 to 65,535). For moderate positive ranges.

Uint32 ~

32-bit unsigned integer (0 to 4,294,967,295). For larger positive numbers.

Uint64 ~

64-bit unsigned integer (0 to 2^64-1). For very large positive numbers.

Float32 ~

32-bit floating point. For decimal numbers with moderate precision.

Float64 ~

64-bit floating point. For high-precision decimal numbers.

String ~

Text data type. Default type for flexible value representation.

Categorical ~

Categorical string type. For efficient storage of repeated string values.

Bool ~

Boolean type. For true/false results.