when

fnSeries when(Series mask, Series a, Series b)

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

maskthe BOOLEAN condition
athe branch selected where the mask is true
bthe branch selected where the mask is false

Returns

the selected Series, named after a.

Throws

DataFrameException when the mask is not BOOLEAN or the

lengths differ.

fnSeries when(T)(Series mask, Series a, T b) if (!is(T == Series))

Ditto, with a scalar b branch broadcast across the mask.

fnSeries when(T)(Series mask, T a, Series b) if (!is(T == Series))

Ditto, with a scalar a branch broadcast across the mask.

fnSeries when(T, U)(Series mask, T a, U b) if (!is(T == Series) && !is(U == Series))

Ditto, with both branches scalar.