Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: window functions need to exclude nuiscance columns #12537

Closed
jreback opened this issue Mar 6, 2016 · 1 comment

Comments

@jreback
Copy link
Contributor

commented Mar 6, 2016

xref example in : #13327

In [4]: df = DataFrame({'A' : pd.date_range('20130101',periods=3),'B' : range(3)})

In [5]: df
Out[5]: 
           A  B
0 2013-01-01  0
1 2013-01-02  1
2 2013-01-03  2

This is a supported op

In [7]: df.rolling(window=2).count()
Out[7]: 
     A    B
0  1.0  1.0
1  2.0  2.0
2  2.0  2.0

This works

In [9]: df.rolling(window=2).B.sum()
Out[9]: 
0    NaN
1    1.0
2    3.0
Name: B, dtype: float64
df.rolling(window=2).sum()

should work (but excluded A) from the results.

@jreback

This comment has been minimized.

Copy link
Contributor Author

commented Mar 6, 2016

xref #4964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.