Skip to content

group_by_aggregation

GroupByAggregationMethods

GroupByAggregationMethods(data_frame, group_by_columns)

Class that provides group by aggregation methods to dataframe.

Parameters:

  • data_frame (DataFrame) –

    DataFrame to be used.

  • group_by_columns (List[str]) –

    The table to which the aggregation result should be pulled.

mean

mean()

Applies AVG operator to given dataframe.

Applies AVG operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying AVG operator.

sum

sum()

Applies SUM operator to given dataframe.

Applies SUM operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying SUM operator.

product

product()

Applies PRODUCT operator to given series.

Applies PRODUCT operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying PRODUCT operator.

count

count()

Applies COUNT operator to given dataframe.

Applies COUNT operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying COUNT operator.

count_distinct

count_distinct()

Applies PU_COUNT_DISTINCT operator to given dataframe.

Applies PU_COUNT_DISTINCT operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying PU_COUNT_DISTINCT operator.

min

min()

Applies MIN operator to given dataframe.

Applies MIN operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying MIN operator.

max

max()

Applies MAX operator to given dataframe.

Applies MAX operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying MAX operator.

median

median()

Applies MEDIAN operator to given dataframe.

Applies MEDIAN operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying MEDIAN operator.

mode

mode()

Applies MODE operator to given dataframe.

Applies MODE operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying MODE operator.

std

std()

Applies STDEV operator to given dataframe.

Applies STDEV operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying STDEV operator.

quantile

quantile(quantile)

Applies QUANTILE operator to given dataframe.

Applies QUANTILE operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying QUANTILE operator.

var

var()

Applies VAR operator to given dataframe.

Applies VAR operator to column.

Returns:

  • pd.DataFrame

    DataFrame after applying VAR operator.