-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
pandas/tests/test_window.py
Outdated
@pytest.mark.parametrize("closed", ["neither", "left"]) | ||
@pytest.mark.parametrize( | ||
"func", ["std", "mean", "median", "sum", "max", "min", "var"]) | ||
def test_closed_empty(self, closed, func): |
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.
we have a fixture for these - look in pandas/conftest
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.
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
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.
you may need to define a separate fixture to avoid some issues
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.
Done
@@ -48,6 +48,12 @@ def win_types_special(request): | |||
return request.param | |||
|
|||
|
|||
@pytest.fixture(params=["sum", "mean", "median", "max", "min", |
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.
ok this is fine; can you do a followup to use this fixture as much as possible in this file?
thanks @ihsansecer very nice, keep em coming! |
git diff upstream/master -u -- "*.py" | flake8 --diff