You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @kmuehlbauer, that's a good idea, I'll have to give some thought about how this could be implemented for each rolling iterator without affecting complexity.
For now, it should be straightforward to do this for some of the functions, just by using a generator with an appropriate fill-value. For example, Sum, filling NaN with 0:
This approach doesn't work for Median however, as the fill value required at each step is not necessarily constant. I'll see whether adding support for missing values is feasible here. FWIW I think pandas just consider the whole window to be NaN if it contains at least one NaN value.
If your window size is small, rolling.Apply(array, window_size, operation=np.nanmedian)) should still be quite fast.
Short question, is it somehow possible to extend this to handle NaN, like numpy
nanmedian
?The text was updated successfully, but these errors were encountered: