Column.iif
iifwhen_truewhen_false
Group: Logical
Aliases: if
Documentation
Replaces True
values with when_true
and False
with when_false
. Only meant for use with boolean columns.
Arguments
when_true
: value or column whenself
isTrue
.when_false
: value or column whenself
isFalse
.
Examples
If the value in a column is True
, replace it with 1
, otherwise 0
.
import Standard.Examples
example_if = Examples.bool_column_1.iif 1 0