amol- commented on a change in pull request #11830:
URL: https://github.com/apache/arrow/pull/11830#discussion_r761194287
##########
File path: docs/source/python/compute.rst
##########
@@ -62,8 +77,89 @@ Here is an example of sorting a table:
0
]
-
+For a complete list of the compute functions that PyArrow provides
+you can refer to :ref:`api.compute` reference.
.. seealso::
:ref:`Available compute functions (C++ documentation)
<compute-function-list>`.
+
+Grouped Aggregations
+====================
+
+PyArrow supports grouped aggregations over :class:`pyarrow.Table` through the
+:meth:`pyarrow.Table.group_by` method.
+The method will return a grouping declaration
+to which the hash aggregation functions can be applied::
+
+ >>> import pyarrow as pa
+ >>> t = pa.table([
+ ... pa.array(["a", "a", "b", "b", "c"]),
+ ... pa.array([1, 2, 3, 4, 5]),
+ ... ], names=["keys", "values"])
+ >>> t.group_by("keys").aggregate([("values", "sum")])
+ pyarrow.Table
+ values_sum: int64
+ keys: string
+ ----
+ values_sum: [[3,7,5]]
+ keys: [["a","b","c"]]
+
+The ``"sum"`` aggregation passed to the ``aggregate`` method in the previous
+example is the :func:`hash_sum` compute function.
Review comment:
It currently is, but there is #11803 which removes it, so remove the
`:func:` from here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]