Skip to content

daft.functions.count_distinct#

count_distinct #

count_distinct(expr: Expression) -> Expression

Counts the number of distinct values in the expression.

Source code in daft/functions/agg.py
30
31
32
def count_distinct(expr: Expression) -> Expression:
    """Counts the number of distinct values in the expression."""
    return Expression._from_pyexpr(expr._expr.count_distinct())