GroupBy#
DataFrameGroupBy
and SeriesGroupBy
instances are returned by groupby calls
cudf.DataFrame.groupby()
and cudf.Series.groupby()
respectively.
Indexing, iteration#
Returns a dictionary mapping group keys to row labels. |
|
Returns a dictionary mapping group keys to row labels. |
|
Dict {group name -> group indices}. |
|
Dict {group name -> group indices}. |
|
|
Construct DataFrame from group with provided name. |
|
Construct DataFrame from group with provided name. |
Function application#
|
Apply a python transformation function over the grouped chunk. |
|
Apply a python transformation function over the grouped chunk. |
|
Apply aggregation(s) to the groups. |
|
Apply aggregation(s) to the groups. |
|
Apply aggregation(s) to the groups. |
|
Apply aggregation(s) to the groups. |
|
Apply an aggregation, then broadcast the result to the group size. |
|
Apply an aggregation, then broadcast the result to the group size. |
|
Apply a function func with arguments to this GroupBy object and return the function's result. |
|
Apply a function func with arguments to this GroupBy object and return the function's result. |
|
Filter elements from groups that don't satisfy a criterion. |
|
Filter elements from groups that don't satisfy a criterion. |
DataFrameGroupBy
computations / descriptive stats#
|
Return True if all values in the group are truthful, else False. |
|
Return True if any value in the group is truthful, else False. |
|
Backward fill NA values. |
|
Compute pairwise correlation of columns, excluding NA/null values. |
|
Compute the number of values in each column. |
|
Compute the pairwise covariance among the columns of a DataFrame, excluding NA/null values. |
|
Return the cumulative count of keys in each group. |
|
Cumulative max for each group. |
|
Cumulative min for each group. |
|
Cumulative product for each group. |
|
Cumulative sum for each group. |
|
Generate descriptive statistics that summarizes the central tendency, dispersion and shape of a dataset's distribution, excluding NaN values. |
|
Get the difference between the values in each group. |
|
Return an ewm grouper, providing ewm functionality per group. |
|
Return an expanding grouper, providing expanding functionality per group. |
|
Forward fill NA values. |
|
Compute first of group values. |
|
Return first n rows of each group |
|
Compute idxmax of group values. |
|
Compute idxmin of group values. |
|
Compute last of group values. |
|
Compute max of group values. |
|
Compute mean of group values. |
|
Compute median of group values. |
|
Compute min of group values. |
|
Number each group from 0 to the number of groups - 1. |
|
Return the nth row from each group. |
|
Return number of unique elements in the group. |
Compute open, high, low and close values of a group, excluding missing values. |
|
|
Calculates the percent change between sequential elements in the group. |
|
Compute prod of group values. |
|
Compute the column-wise quantiles of the values in each group. |
|
Return the rank of values within each group. |
|
Provide resampling when using a TimeGrouper. |
|
Returns a RollingGroupby object that enables rolling window calculations on the groups. |
|
Return a random sample of items in each group. |
|
Shift each group by |
Return the size of each group. |
|
|
Compute the column-wise std of the values in each group. |
|
Compute sum of group values. |
|
Compute the column-wise variance of the values in each group. |
|
Return last n rows of each group |
|
Return the elements in the given positional indices in each group. |
|
Return a Series or DataFrame containing counts of unique rows. |
SeriesGroupBy
computations / descriptive stats#
|
Return True if all values in the group are truthful, else False. |
|
Return True if any value in the group is truthful, else False. |
|
Backward fill NA values. |
|
|
|
Compute the number of values in each column. |
|
Compute the pairwise covariance among the columns of a DataFrame, excluding NA/null values. |
|
Return the cumulative count of keys in each group. |
|
Cumulative max for each group. |
|
Cumulative min for each group. |
|
Cumulative product for each group. |
|
Cumulative sum for each group. |
|
Generate descriptive statistics that summarizes the central tendency, dispersion and shape of a dataset's distribution, excluding NaN values. |
|
Get the difference between the values in each group. |
|
Return an ewm grouper, providing ewm functionality per group. |
|
Return an expanding grouper, providing expanding functionality per group. |
|
Forward fill NA values. |
|
Compute first of group values. |
|
Return first n rows of each group |
|
Compute last of group values. |
|
Compute idxmax of group values. |
|
Compute idxmin of group values. |
Return whether each group's values are monotonically increasing. |
|
Return whether each group's values are monotonically decreasing. |
|
|
Compute max of group values. |
|
Compute mean of group values. |
|
Compute median of group values. |
|
Compute min of group values. |
|
Number each group from 0 to the number of groups - 1. |
|
Return the largest n elements. |
|
Return the smallest n elements. |
|
Return the nth row from each group. |
|
Return number of unique elements in the group. |
Get a list of the unique values for each column in each group. |
|
Compute open, high, low and close values of a group, excluding missing values. |
|
|
Calculates the percent change between sequential elements in the group. |
|
Compute prod of group values. |
|
Compute the column-wise quantiles of the values in each group. |
|
Return the rank of values within each group. |
|
Provide resampling when using a TimeGrouper. |
|
Returns a RollingGroupby object that enables rolling window calculations on the groups. |
|
Return a random sample of items in each group. |
|
Shift each group by |
Return the size of each group. |
|
|
Compute the column-wise std of the values in each group. |
|
Compute sum of group values. |
|
Compute the column-wise variance of the values in each group. |
|
Return last n rows of each group |
|
Return the elements in the given positional indices in each group. |
|
Plotting and visualization#
|
|
|
|
|
|
Make plots of a grouped Series or DataFrame. |
|
Make plots of a grouped Series or DataFrame. |