Using cython/numba for Pandas groupby aggregation

Viewed 415

With DataFrame.apply it is possible to use raw=True which causes the applied function to be called with a Numpy array, allowing for speedus by writing the function in Cython using JITint it with Numba.

Is the same possible with DataFrame.groupby().agg?

1 Answers

Unfortunately this is currently not possible.

GroupBy.agg accepts a single parameter func, which is a callable (the function you want to run). Any additional args or kwargs are passed to your func.

see: pandas docs

Related