DataFrame.groupby
Group DataFrame using a mapper or by a Series of columns.
danfo.DataFrame.groupby(columns)
Parameters
Type
Description
Default
columns
Array
The names of a column(s) in the DataFrame to group by
Examples
Groupby a single column from a DataFrame
A groupby operation will return a GroupBy class object. You can apply any of the following operation on the groupby result:
Example of Groupby and apply a sum function
Groupby a two columns from a DataFrame
Last updated