# GroupBy¶

GroupBy objects are returned by groupby calls: `cudf.DataFrame.groupby()`, `cudf.Series.groupby()`, etc.

## Indexing, iteration¶

 `GroupBy.groups` Like @property, but only evaluated upon first invocation.
 `Grouper`([key, level, freq, closed, label])

## Function application¶

 `GroupBy.apply`(function) Apply a python transformation function over the grouped chunk. `GroupBy.agg`(func) Apply aggregation(s) to the groups. Apply aggregation(s) to the groups. Apply aggregation(s) to the groups. `GroupBy.pipe`(func, *args, **kwargs) Apply a function func with arguments to this GroupBy object and return the function’s result.

## Computations / descriptive stats¶

 `GroupBy.bfill`([limit]) Backward fill NA values. `GroupBy.backfill`([limit]) Backward fill NA values. `GroupBy.count`([dropna]) Compute the number of values in each column. Return the cumulative count of keys in each group. Get the column-wise cumulative maximum value in each group. Get the column-wise cumulative minimum value in each group. Compute the column-wise cumulative sum of the values in each group. `GroupBy.ffill`([limit]) Forward fill NA values. Get the column-wise maximum value in each group. Compute the column-wise mean of the values in each group. Get the column-wise median of the values in each group. Get the column-wise minimum value in each group. Return the nth row from each group. `GroupBy.pad`([limit]) Forward fill NA values. Compute the column-wise product of the values in each group. Return the size of each group. `GroupBy.std`([ddof]) Compute the column-wise std of the values in each group. Compute the column-wise sum of the values in each group. `GroupBy.var`([ddof]) Compute the column-wise variance of the values in each group. `GroupBy.corr`([method, min_periods]) Compute pairwise correlation of columns, excluding NA/null values.

The following methods are available in both `SeriesGroupBy` and `DataFrameGroupBy` objects, but may differ slightly, usually in that the `DataFrameGroupBy` version usually permits the specification of an axis argument, and often an argument indicating whether to restrict application to columns of a specific data type.

 `DataFrameGroupBy.backfill`([limit]) Backward fill NA values. `DataFrameGroupBy.bfill`([limit]) Backward fill NA values. `DataFrameGroupBy.count`([dropna]) Compute the number of values in each column. Return the cumulative count of keys in each group. Get the column-wise cumulative maximum value in each group. Get the column-wise cumulative minimum value in each group. Compute the column-wise cumulative sum of the values in each group. `DataFrameGroupBy.describe`([include, exclude]) Generate descriptive statistics that summarizes the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values. `DataFrameGroupBy.diff`([periods, axis]) Get the difference between the values in each group. `DataFrameGroupBy.ffill`([limit]) Forward fill NA values. `DataFrameGroupBy.fillna`([value, method, ...]) Fill NA values using the specified method. Get the column-wise index of the maximum value in each group. Get the column-wise index of the minimum value in each group. Return the number of unique values per group `DataFrameGroupBy.pad`([limit]) Forward fill NA values. `DataFrameGroupBy.quantile`([q, interpolation]) Compute the column-wise quantiles of the values in each group. `DataFrameGroupBy.shift`([periods, freq, ...]) Shift each group by `periods` positions. Return the size of each group.

The following methods are available only for `SeriesGroupBy` objects.

 Compute the number of unique values in each column in each group. Get a list of the unique values for each column in each group.