Aggregates¶
- class dark.aggregates.Count(key=None, na_policy=1)¶
Counts distinct values for given key. If key is not specified, simply counts all items in the query.
- class dark.aggregates.Median(key, na_policy=1)¶
Given a vector V of length N, the median of V is the middle value of a sorted copy of V, V_sorted - i.e., V_sorted[(N-1)/2], when N is odd. When N is even, it is the average of the two middle values of V_sorted.
- class dark.aggregates.Qu1(key, na_policy=1)¶
Calculates the q0.25.
- class dark.aggregates.Qu3(key, na_policy=1)¶
Calculates the q0.75.
- class dark.aggregates.NA¶
Policy against N/A values. To be used in Aggregate constructors:
Min('key', NA.skip).