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: Add method argument to rolling constructor to allow table-wise rolling #38417

Merged
merged 51 commits into from
Dec 27, 2020

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Dec 11, 2020

@pep8speaks
Copy link

pep8speaks commented Dec 12, 2020

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

@jreback jreback added API Design Window rolling, ewma, expanding labels Dec 13, 2020
Copy link
Contributor

@jreback jreback left a 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.

@mroeschke
Copy link
Member Author

Looks like Travis is timing out

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

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

@mroeschke mroeschke mentioned this pull request Dec 18, 2020
32 tasks
@jreback jreback added this to the 1.3 milestone Dec 18, 2020
Copy link
Contributor

@jreback jreback left a 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

@jreback
Copy link
Contributor

jreback commented Dec 22, 2020

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):
Copy link
Member

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)

Copy link
Member Author

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

@@ -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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{'single', 'table'}, default 'single'?

@mroeschke mroeschke mentioned this pull request Dec 23, 2020
4 tasks
@mroeschke
Copy link
Member Author

Thanks @jreback. Merge conflict mess up on my part.

@jreback jreback merged commit dc09a8a into pandas-dev:master Dec 27, 2020
@jreback
Copy link
Contributor

jreback commented Dec 27, 2020

thanks @mroeschke very nice here!

@mroeschke mroeschke deleted the feature/rolling_table branch December 27, 2020 23:38
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Table-wise rolling / expanding / EWM function application
5 participants