dataframe-operations-1.1.0.3: Column operations, expression DSL, and statistics for the dataframe ecosystem.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Operations.Aggregation

Synopsis

Documentation

aggregate :: [NamedExpr] -> GroupedDataFrame -> DataFrame Source #

Aggregate a grouped dataframe using the expressions given. All ungrouped columns will be dropped.

distinct :: DataFrame -> DataFrame Source #

Filter out all non-unique values in a dataframe.

hashKeyUnboxed :: Unbox a => MVector s Int -> Maybe Bitmap -> (Int -> a -> Int) -> Vector a -> ST s () Source #

Fold a value-mix over an unboxed key column into the running hash vector, respecting the null bitmap (a null slot mixes nullSalt instead of its uninitialised stored value, so Nothing never matches a present Just x). The non-nullable case is the original tight loop. INLINEd to specialise per call.

groupBy :: [Text] -> DataFrame -> GroupedDataFrame #

O(k * n) groups the dataframe by the given rows aggregating the remaining rows into vector that should be reduced later.

buildRowToGroup :: Int -> Vector Int -> Vector Int -> Vector Int #

Build the rowToGroup lookup vector from valueIndices and offsets. rowToGroup[i] = k means row i belongs to group k.