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
expanding/rolling_apply() interpret min_periods=0 as min_periods=1. This is usually ok, as almost every function will return NaN when the inputs are all NaN. However, this is not true, for example, of functions like len().
For example, I think that in the following calls, the results should be 1, 2, 2 and 1, 2, 3, respectively.
In [409]: rolling_apply(Series([None, None, None]), 2, lambda x: len(x), min_periods=0)
Out[409]:
0 NaN
1 NaN
2 NaN
dtype: float64
In [411]: expanding_apply(Series([None, None, None]), lambda x: len(x), min_periods=0)
Out[411]:
0 NaN
1 NaN
2 NaN
dtype: float64