Skip to content

BUG: Fix empty closed window issue with rolling min and max #27140

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

Merged
merged 6 commits into from
Jul 1, 2019

Conversation

ihsansecer
Copy link
Contributor

@ihsansecer ihsansecer changed the title Fix roll max left BUG: Fix empty closed window issue with rolling min and max Jun 30, 2019
@WillAyd WillAyd added the Window rolling, ewma, expanding label Jun 30, 2019
@pytest.mark.parametrize("closed", ["neither", "left"])
@pytest.mark.parametrize(
"func", ["std", "mean", "median", "sum", "max", "min", "var"])
def test_closed_empty(self, closed, func):
Copy link
Contributor

Choose a reason for hiding this comment

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

we have a fixture for these - look in pandas/conftest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it is all_numeric_reductions but prod function fails since it is not implemented for Rolling. I will add kurt and skew to the list

Copy link
Contributor

Choose a reason for hiding this comment

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

you may need to define a separate fixture to avoid some issues

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jreback jreback added this to the 0.25.0 milestone Jul 1, 2019
@@ -48,6 +48,12 @@ def win_types_special(request):
return request.param


@pytest.fixture(params=["sum", "mean", "median", "max", "min",
Copy link
Contributor

Choose a reason for hiding this comment

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

ok this is fine; can you do a followup to use this fixture as much as possible in this file?

@jreback jreback merged commit 3b3b791 into pandas-dev:master Jul 1, 2019
@jreback
Copy link
Contributor

jreback commented Jul 1, 2019

thanks @ihsansecer very nice, keep em coming!

@ihsansecer ihsansecer deleted the fix-roll-max-left branch July 11, 2019 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

offset-based rolling window, multiple issues with closed='left'
3 participants