a.when
Eager conditional selection (ADR-2026-10-23-08): element-wise mask ? a : b under the approved semantics - a BOOLEAN mask of the branches' length, supertype-promoted branches, and a null mask slot yielding a null output slot (unlike filter, where null drops, nothing is dropped here, so the null stays visible). A null slot in the selected branch propagates its null; values of unselected slots are never read.
Parameters
mask | the BOOLEAN condition |
a | the branch selected where the mask is true |
b | the branch selected where the mask is false |
Returns
the selected Series, named after
Throws
DataFrameException when the mask is not BOOLEAN or the
lengths differ.
Ditto, with a scalar b branch broadcast across the mask.
Ditto, with a scalar a branch broadcast across the mask.