Skip to content

daft.functions.round#

round #

round(expr: Expression, decimals: Expression | int = 0) -> Expression

The round of a numeric expression.

Parameters:

Name Type Description Default
expr Expression

The expression to round

required
decimals Expression | int

number of decimal places to round to. Defaults to 0.

0
Source code in daft/functions/numeric.py
55
56
57
58
59
60
61
62
def round(expr: Expression, decimals: Expression | int = 0) -> Expression:
    """The round of a numeric expression.

    Args:
        expr: The expression to round
        decimals: number of decimal places to round to. Defaults to 0.
    """
    return Expression._call_builtin_scalar_fn("round", expr, decimals)