Open erezinman opened 2 years ago
hmm i thought we did this already or maybe that's in table mode
cc @mroeschke
This is already the case in groupby.agg/transform
with the numba engine but not possible with rolling.apply
currently.
As a workaround, you can bring the index into the DataFrame
and use method="table"
(which always uses numba) to access the index in one column of the 2D numpy array.
Not too thrilled about having raw
having another acceptable value as it's also relevant to the cython engine.
In many cases (especially in non-uniform indexed time-series), one needs to know the index of the series during a
rolling
operation. While it is possible to obtain the index & values in the non-raw
mode, it isn't possible to use the optimizations of the "numba" engine with that.I propose a new
raw
-argument mode (saydf.rolling('1min').apply(..., raw='with_index', engine="numba")
), that assumes a second argument for the index. For example: