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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add kurt and skew to the list of tested functions
  • Loading branch information
ihsansecer committed Jun 30, 2019
commit d9adc042add47dede717f9cdabc22aec9e2f1ea6
4 changes: 2 additions & 2 deletions pandas/tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ def test_closed(self):
df.rolling(window=3, closed='neither')

@pytest.mark.parametrize("closed", ["neither", "left"])
@pytest.mark.parametrize(
"func", ["std", "mean", "median", "sum", "max", "min", "var"])
@pytest.mark.parametrize("func", ["var", "std", "mean", "median", "sum",
"max", "min", "kurt", "skew"])
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

# GH 26005
ser = pd.Series(data=np.arange(5),
Expand Down