Skip to content

ENH: Add get_window method on a rolling object #38065

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

Open
ThomasBourgeois opened this issue Nov 25, 2020 · 4 comments
Open

ENH: Add get_window method on a rolling object #38065

ThomasBourgeois opened this issue Nov 25, 2020 · 4 comments
Assignees
Labels
Enhancement Window rolling, ewma, expanding

Comments

@ThomasBourgeois
Copy link

Is your feature request related to a problem?

Yes. I would like to make a test of a function that is then applied on a rolling object. Making that test on just one window of the rolling object would be convenient.

Describe the solution you'd like

Someting similar to get_group for a groupby object. This would be something like : rolling.get_window(0) for first window for example.

API breaking implications

I do not know of any.

Describe alternatives you've considered

Additional context

@ThomasBourgeois ThomasBourgeois added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 25, 2020
@mroeschke
Copy link
Member

Sure, I suppose rolling objects could have a get_window method that acts similarly to get_group for groupby objects.

The current workaround today would be to just iterate over the rolling object until you encounter the desired window.

PRs welcome!

@mroeschke mroeschke added Window rolling, ewma, expanding and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 25, 2020
@mroeschke mroeschke changed the title ENH: add possibility to see windows of a rolling object ENH: Add get_window method on a rolling object Nov 25, 2020
@jreback
Copy link
Contributor

jreback commented Nov 25, 2020

you can kind of do this now with iteration: #34201, e.g. skip thru the groups to get the one you want.

@jreback jreback added this to the Contributions Welcome milestone Nov 25, 2020
@leonarduschen
Copy link
Contributor

leonarduschen commented Nov 26, 2020

I'll take this

@leonarduschen
Copy link
Contributor

take

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Window rolling, ewma, expanding
Projects
None yet
Development

No branches or pull requests

4 participants