daft.functions.count#
count #
count(expr: Expression | None = None, mode: Literal['all', 'valid', 'null'] | CountMode = Valid) -> Expression
Counts the number of values in the expression.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | None | The input expression to count values from. If not provided, mode must be "all" and count(*) semantics will be used. | None |
mode | Literal['all', 'valid', 'null'] | CountMode | A string ("all", "valid", or "null") that represents whether to count all values, non-null (valid) values, or null values. Defaults to "valid". | Valid |
Source code in daft/functions/agg.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |