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
The text was updated successfully, but these errors were encountered:
seth-p
changed the title
BUG: expanding/rolling_apply() with min_periods=0
BUG: expanding/rolling_apply() interpret min_periods=0 as min_periods=1
Aug 20, 2014
expanding/rolling_apply()
interpretmin_periods=0
asmin_periods=1
. This is usually ok, as almost every function will returnNaN
when the inputs are allNaN
. However, this is not true, for example, of functions likelen()
.For example, I think that in the following calls, the results should be
1, 2, 2
and1, 2, 3
, respectively.The text was updated successfully, but these errors were encountered: