ibis.expr.api.ValueExpr.case

ValueExpr.case(arg)

Create a new SimpleCaseBuilder to chain multiple if-else statements. Add new search expressions with the .when method. These must be comparable with this array expression. Conclude by calling .end()

Returns:builder : CaseBuilder

Examples

>>> case_expr = (expr.case()
...              .when(case1, output1)
...              .when(case2, output2)
...              .default(default_output)
...              .end())