Skip to content

daft.functions.any_value#

any_value #

any_value(expr: Expression, ignore_nulls: bool = False) -> Expression

Returns any non-null value from the expression.

Parameters:

Name Type Description Default
expr Expression

The input expression to select a value from.

required
ignore_nulls bool

whether to ignore null values when selecting the value. Defaults to False.

False
Source code in daft/functions/agg.py
260
261
262
263
264
265
266
267
def any_value(expr: Expression, ignore_nulls: bool = False) -> Expression:
    """Returns any non-null value from the expression.

    Args:
        expr (Expression): The input expression to select a value from.
        ignore_nulls: whether to ignore null values when selecting the value. Defaults to False.
    """
    return Expression._from_pyexpr(expr._expr.any_value(ignore_nulls))