-
-
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: Add method argument to rolling constructor to allow table-wise rolling #38417
Conversation
Hello @mroeschke! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-27 19:53:30 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, some questions.
Looks like Travis is timing out
Locally, the tests I added to do take a long time to run (parameterized over a lot of values). We have the same tests running & completing in Linux py37 min versions and Windows py38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any comment @pandas-dev/pandas-core
cc @jbrockmendel if you can have a look |
df = pd.DataFrame(np.random.randn(10, 1000)) | ||
self.roll = df.rolling(2, method=method) | ||
|
||
def time_apply(self, method): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is method not used in this one? so we're re-doing the same benchmark twice? (not a deal-breaker asi think this happens in a number of places)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I think I put the parameterization in the wrong place. Thanks
pandas/core/window/expanding.py
Outdated
@@ -24,6 +24,14 @@ class Expanding(RollingAndExpandingMixin): | |||
center : bool, default False | |||
Set the labels at the center of the window. | |||
axis : int or str, default 0 | |||
method : str, default 'single' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{'single', 'table'}, default 'single'
?
Thanks @jreback. Merge conflict mess up on my part. |
thanks @mroeschke very nice here! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff