-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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: Rolling with steps #43973
ENH: Rolling with steps #43973
Conversation
rosagold
commented
Oct 11, 2021
•
edited
Loading
edited
- closes Rolling window with step size #15354
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
- update docu
- docu example
- add versionadded to docu if accepted
…nd of centered windows.
…s or datetime-like on datetime-like windows.
moved question here |
Personally, I am still not 100% enthusiastic about including this directly in pandas due to:
If this would be pursued, I would suggest having this only apply for pure |
I'm also not totally convinced, that this is a must have feature, just that i'm currently deeply familiar with the rolling because of #43997 and #43927, so i thought i could tackle this before i focus on something else. But if this has little change to get in pandas, i find other things to do, with no hard feelings :D
Yeah, i agree, but as i understand is the main struggle the users precious calculation time. Because any non-standard/non-vectorized function (most functions passed to
Because i'm also not a fan of breaking the API output consistency i choose an approach which always return same dimensions as the input data. Instead of manipulating the total number of generated data-chunks (and breaking the api), i would simply set the stepped-over data-chunks to zero length. This by just using the
I totally agree, and would just bring it in where it makes sense, namely pure rolling.. |
Yeah I think this feature needs a little more discussion / buy-in from the core team before an implementation is pursued, but great work so far!
This an interesting approach which sounds reasonable. To maintain the same dimensions of the input data, what would the value of the stepped over chunks? P.S. If you are interested on working on other windowing issues I would suggest #26958, #37535, #43405, #43579 |
This depends on the function that is called, unfortunately this is not consistent even not with the existing functions. One can simple see this by calling eg. import pandas as pd
pd.Series([1,1,1,]).rolling(0).sum()
# 0 0.0
# 1 0.0
# 2 0.0
# dtype: float64
pd.Series([1,1,1,]).rolling(0).max()
# 0 NaN
# 1 NaN
# 2 NaN
# dtype: float64 well, maybe its a bug in |
should i close this PR or should i just keep it a Draft ? |
I suggest closing for now as more discussion should happen in the original issue first. |