Closed
Description
in my env(mac, python3.6.1,pandas0.23.4)
In [26]: df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
In [27]: df
Out[27]:
B
0 0.0
1 1.0
2 2.0
3 NaN
4 4.0
In [28]: df.rolling(2, win_type='triang').sum()
Out[28]:
B
0 NaN
1 0.5
2 1.5
3 NaN
4 NaN
In [29]: df.rolling(2, win_type='triang').mean()
Out[29]:
B
0 NaN
1 0.5
2 1.5
3 NaN
4 NaN
but in the docs,
df.rolling(2, win_type='triang').sum()
B
0 NaN
1 1.0
2 2.5
3 NaN
4 NaN
q1: docs.sum and myenv.sum is different
q2:sum()'result is the same as means()'result