GroupBy¶
The groupby
method is used to group data in a DataFrame or Series based on a given column or index level. The grouped data can then be aggregated, transformed, or filtered using various methods.
Bodo supports the following groupby
methods:
Function | Description |
---|---|
pd.core.groupby.Groupby.agg |
Compute aggregation using one or more operations over the specified axis. |
pd.core.groupby.DataFrameGroupby.aggregate |
Compute aggregation using one or more operations over the specified axis. |
pd.core.groupby.Groupby.apply |
Apply a function to each group. |
pd.core.groupby.Groupby.count |
Count non-NA cells for each column or row. |
pd.core.groupby.Groupby.cumsum |
Compute the cumulative sum of the values. |
pd.core.groupby.Groupby.first |
Compute the first value of the group. |
pd.core.groupby.Groupby.head |
Return the first n rows of each group. |
pd.core.groupby.DataFrameGroupby.idxmax |
Compute the index of the maximum value. |
pd.core.groupby.DataFrameGroupby.idxmin |
Compute the index of the minimum value. |
pd.core.groupby.Groupby.last |
Compute the last value of the group. |
pd.core.groupby.Groupby.max |
Compute the maximum value of the group. |
pd.core.groupby.Groupby.mean |
Compute the mean value of the group. |
pd.core.groupby.Groupby.median |
Compute the median value of the group. |
pd.core.groupby.Groupby.min |
Compute the minimum value of the group. |
pd.core.groupby.DataFrameGroupby.nunique |
Compute the number of unique values in the group. |
pd.core.groupby.Groupby.pipe |
Apply a function to each group. |
pd.core.groupby.Groupby.prod |
Compute the product of the group. |
pd.core.groupby.Groupby.rolling |
Provide rolling window calculations. |
pd.Series.groupby |
Group series using a mapper or by a series of columns. |
pd.core.groupby.Groupby.shift |
Shift the group by a number of periods. |
pd.core.groupby.Groupby.size |
Compute group sizes. |
pd.core.groupby.Groupby.std |
Compute the standard deviation of the group. |
pd.core.groupby.Groupby.sum |
Compute the sum of the group. |
pd.core.groupby.Groupby.transform |
Apply a function to each group. |
pd.core.groupby.SeriesGroupBy.value_counts |
Count unique values in the group. |
pd.core.groupby.Groupby.var |
Compute the variance of the group. |