Skip to content

when

pydantable.expressions.when

when(condition, value)

First branch of a CASE WHEN (chain .when(...).otherwise(...)).

Source code in python/pydantable/expressions.py
def when(condition: Expr, value: Expr) -> WhenChain:
    """First branch of a ``CASE WHEN`` (chain ``.when(...).otherwise(...)``)."""
    return WhenChain(condition, value)