GroupBy
GroupBy is a useful tool for data grouping and aggregation in DolphinDB pandas. With GroupBy, users can group data based on a single column or more, and apply a function (such as aggregation, transformation, or filtering) to each group independently.
Note:
-
All group-by columns must be of the same data type.
-
The GroupBy calculation results of all functions (other than
cumcount) are sorted in a different order from the original input. The order within each group remains the same as the original, while that across groups is determined by the GroupBy column(s).
Function Application
|
Function |
Compatibility Statement |
| apply |
Computations / Descriptive Statistics
|
Function |
Compatibility Statement |
|---|---|
| rolling | Only parameters window and min_periods are supported. |
| cumprod | No parameter is supported. |
| cumsum | No parameter is supported. |
| diff | No parameter is supported. |
| max | Only the parameter numeric_only is supported. |
| min | Only the parameter numeric_only is supported. |
| mean | Only the parameter numeric_only is supported. |
| std | Only the parameter numeric_only is supported. |
| sum | The sum of literal data or data of POINT, UUID, IPADDR, INT128, or COMPLEX type returns NULL. |
| shift | The parameter axis is not supported. |
| var | Only the parameter numeric_only is supported. |
