GroupBy#
GroupBy objects are returned by groupby
calls: mars.dataframe.DataFrame.groupby()
, mars.dataframe.Series.groupby()
, etc.
Indexing, iteration#
Function application#
|
Apply function func group-wise and combine the results together. |
|
Aggregate using one or more operations on grouped data. |
|
Aggregate using one or more operations on grouped data. |
|
Call function producing a like-indexed DataFrame on each group and return a DataFrame having the same indexes as the original object filled with the transformed values |
Computations / descriptive stats#
|
|
|
|
|
Backward fill the values. |
|
Backward fill the values. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Forward fill the values. |
|
Return first n rows of each group. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
Fill NA/NaN values using the specified method |
|
|
|
Return a random sample of items from each group. |
The following methods are available only for SeriesGroupBy
objects.
The following methods are available only for DataFrameGroupBy
objects.