Search code examples
pythonmathuser-defined-functionspyarrowapache-arrow

cumulative product with pyarrow


Is it possible to calculate the cumulative product with pyarrow lib?

I only see a cumulative sum function in the docs: pyarrow comulative compute functions

Could someone tell me how to apply the cumulative product on a pyarrow array, maybe with UDFs?

Is there an arrow native function for cumulative product?


Solution

  • User defined functions don't yet support vector functions, which cumulative product would be.

    A workaround would be to call numpy.cumprod directly.