Gathering DataFrame or Series utilizing a mapper or by a series of sections.

A group activity includes a mix of parting the item, applying a capacity, and joining the outcomes. This can be utilized to assemble a lot of information and register activities on these gatherings.
by: mapping, function, label, or list of labels
Used to decide the gatherings for the group. In the event that is a capacity, it approaches each estimation of the item’s record. On the off chance that a dict or series is passed, the series or dict VALUES will be utilized to decide the gatherings (the series’s qualities are first adjusted; see .adjust() technique). On the off chance that a ndarray is passed, the qualities are utilized as-is to decide the gatherings. A name or rundown of marks might be passed to aggregate the sections in self. Notice that a tuple is translated as a (solitary) key.
axis : {0 or ‘index’, 1 or ‘columns’}, default 0
Split along rows (0) or columns (1).

level: int, level name, or sequence of such, default None
If the axis is a multiIndex (hierarchical), group by a particular level or levels.

as_index: bool, default True
For aggregated output, return an object with group labels as the index. Only relevant for DataFrame input. as_index=False is effectively “SQL-style” grouped output.

sort: bool, default True
Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group.

group_keys: bool, default True
When calling apply, add group keys to the index to identify pieces.
squeeze: bool, default False
Reduce the dimensionality of the return type if possible, otherwise, return a consistent type.

observed: bool, default False
This only applies if any of the groupers are categorical. If true: only show observed values for categorical groupers. If false: show all values for categorical groupers.
New in version 0.23.0.
**kwargs
Optional, only accepts keyword argument ‘mutated’ and is passed to groupby.
Returns:
DataFrameGroupBy or SeriesGroupBy
Depends on the calling object and returns groupby object that contains information about the groups.