> For the complete documentation index, see [llms.txt](https://danfo.jsdata.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://danfo.jsdata.org/api-reference/groupby.md).

# Groupby

### Indexing, iteration

|                                                                                                                            |                                                    |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| [`GroupBy.get_group`](https://github.com/javascriptdata/danfojs-doc/blob/master/api-reference/groupby/groupby.getGroup.md) | Construct DataFrame from group with provided name. |

### Function application

|                                                        |                                                                 |
| ------------------------------------------------------ | --------------------------------------------------------------- |
| [`GroupBy.agg`](/api-reference/groupby/groupby.agg.md) | Aggregate using one or more operations over the specified axis. |

### Computations / descriptive stats

|                                                                                                                                                  |                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
| [`GroupBy.count`](/api-reference/groupby/groupby.count.md)                                                                                       | Compute count of group, excluding missing values.               |
| [`GroupBy.cumMax`](https://github.com/javascriptdata/danfojs-doc/blob/master/api-reference/groupby/groupby.cummax.md)                            | Cumulative max for each group.                                  |
| [`GroupBy.cumMin`](https://github.com/javascriptdata/danfojs-doc/blob/master/api-reference/groupby/groupby.cummin.md)                            | Cumulative min for each group.                                  |
| [`GroupBy.cumProd`](https://github.com/javascriptdata/danfojs-doc/blob/master/api-reference/groupby/groupby.cumprod.md)                          | Cumulative product for each group.                              |
| [`GroupBy.cumSum`](https://github.com/javascriptdata/danfojs-doc/blob/master/api-reference/groupby/groupby.cumsum.md)                            | Cumulative sum for each group.                                  |
| [`GroupBy.max`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.GroupBy.max.html#pandas.core.groupby.GroupBy.max) | Compute max of group values.                                    |
| [`GroupBy.mean`](/api-reference/groupby/groupby.mean.md)                                                                                         | Compute mean of groups, excluding missing values.               |
| [`GroupBy.min`](/api-reference/groupby/groupby.min.md)                                                                                           | Compute min of group values.                                    |
| [`GroupBy.std`](/api-reference/groupby/groupby.std.md)                                                                                           | Compute standard deviation of groups, excluding missing values. |
| [`GroupBy.sum`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.GroupBy.sum.html#pandas.core.groupby.GroupBy.sum) | Compute sum of group values.                                    |
| [`GroupBy.var`](/api-reference/groupby/groupby.var.md)                                                                                           | Compute variance of groups, excluding missing values.           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://danfo.jsdata.org/api-reference/groupby.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
