Skip to content

ENH: window functions need to exclude nuiscance columns #12537

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

Closed
jreback opened this issue Mar 6, 2016 · 1 comment · Fixed by #27044
Closed

ENH: window functions need to exclude nuiscance columns #12537

jreback opened this issue Mar 6, 2016 · 1 comment · Fixed by #27044
Labels
Dtype Conversions Unexpected or buggy dtype conversions Resample resample method Reshaping Concat, Merge/Join, Stack/Unstack, Explode Window rolling, ewma, expanding
Milestone

Comments

@jreback
Copy link
Contributor

jreback 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 jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Dtype Conversions Unexpected or buggy dtype conversions Difficulty Intermediate labels Mar 6, 2016
@jreback jreback added this to the 0.18.1 milestone Mar 6, 2016
@jreback
Copy link
Contributor Author

jreback commented Mar 6, 2016

xref #4964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Resample resample method Reshaping Concat, Merge/Join, Stack/Unstack, Explode Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants