Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python, Pandas: GroupBy attributes documentation

On the Groupby documentation, at that level of the page: http://pandas.pydata.org/pandas-docs/stable/groupby.html#groupby-object-attributes

If you scroll down a bit you can see their is a list of all the available groupby attributes:

gb.agg        gb.boxplot    gb.cummin     gb.describe   gb.filter     gb.get_group  gb.height     gb.last       gb.median     gb.ngroups    gb.plot       gb.rank       gb.std        gb.transform
gb.aggregate  gb.count      gb.cumprod    gb.dtype      gb.first      gb.groups     gb.hist       gb.max        gb.min        gb.nth        gb.prod       gb.resample   gb.sum        gb.var
gb.apply      gb.cummax     gb.cumsum     gb.fillna     gb.gender     gb.head       gb.indices    gb.mean       gb.name       gb.ohlc       gb.quantile   gb.size       gb.tail       gb.weight

Where can I find documentation about what those attributes are/do? Using the ? in Jupyter doesn't show their docs.

like image 325
Radar Avatar asked Jan 17 '17 10:01

Radar


People also ask

What is groupby in pandas Dataframe?

Pandas groupby is used for grouping the data according to the categories and apply a function to the categories. It also helps to aggregate data efficiently. Pandas dataframe.groupby () function is used to split the data into groups based on some criteria. pandas objects can be split on any of their axes.

How do you group data in pandas?

Pandas dataframe.groupby() function is used to split the data into groups based on some criteria. pandas objects can be split on any of their axes. The abstract definition of grouping is to provide a mapping of labels to group names.

How to group the data based on the “team” in Python?

Example #1: Use groupby () function to group the data based on the “Team”. import pandas as pd. df = pd.read_csv ("nba.csv") df. Now apply the groupby () function. gk = df.groupby ('Team') gk.first ()

What is a groupby operation in Python?

A groupby operation involves some combination of splitting the object, applying a function, and combining the results. This can be used to group large amounts of data and compute operations on these groups. Parameters. bymapping, function, label, or list of labels. Used to determine the groups for the groupby.


1 Answers

I think you can check groupby docs.

  1. Indexing, iteration
  2. Function application
  3. Computations / Descriptive Stats
like image 183
jezrael Avatar answered Sep 23 '22 15:09

jezrael