You are viewing documentation about an older version (1.16.0). View latest version

Grouping

Classes

RelationalGroupedDataFrame(df, ...)

Represents an underlying DataFrame with rows that are grouped by common values.

GroupingSets(*sets)

Creates a GroupingSets object from a list of column/expression sets that you pass to DataFrame.group_by_grouping_sets().

Methods

RelationalGroupedDataFrame.agg(*exprs)

Returns a DataFrame with computed aggregates.

RelationalGroupedDataFrame.apply_in_pandas(...)

Maps each grouped dataframe in to a pandas.DataFrame, applies the given function on data of each grouped dataframe, and returns a pandas.DataFrame.

RelationalGroupedDataFrame.applyInPandas(...)

Maps each grouped dataframe in to a pandas.DataFrame, applies the given function on data of each grouped dataframe, and returns a pandas.DataFrame.

RelationalGroupedDataFrame.avg(*cols)

Return the average for the specified numeric columns.

RelationalGroupedDataFrame.builtin(agg_name)

Computes the builtin aggregate agg_name over the specified columns.

RelationalGroupedDataFrame.count()

Return the number of rows for each group.

RelationalGroupedDataFrame.function(agg_name)

Computes the builtin aggregate agg_name over the specified columns.

RelationalGroupedDataFrame.max(*cols)

Return the max for the specified numeric columns.

RelationalGroupedDataFrame.mean(*cols)

Return the average for the specified numeric columns.

RelationalGroupedDataFrame.median(*cols)

Return the median for the specified numeric columns.

RelationalGroupedDataFrame.min(*cols)

Return the min for the specified numeric columns.

RelationalGroupedDataFrame.sum(*cols)

Return the sum for the specified numeric columns.

Language: English