-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
15819 rolling window on empty df #16431
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
Changes from 2 commits
9cbaef6
d31b983
5fb1170
670a33a
e913664
985522f
6007654
4a81a5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -441,6 +441,16 @@ def test_closed(self): | |
with pytest.raises(ValueError): | ||
df.rolling(window=3, closed='neither') | ||
|
||
def test_empty_df_datetime_rolling_sum(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rather than making all separate tests, either use parametrize, or you can consolidate these into 2 tests for rolling (and 2 for expanding) e.g.
|
||
result = DataFrame().rolling('1s').sum() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cna you leave a comment here with the github issue number? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I have updated with a comment |
||
expected = DataFrame() | ||
tm.assert_frame_equal(result, expected) | ||
|
||
def test_empty_df_integer_rolling_sum(self): | ||
result = DataFrame().rolling(1).sum() | ||
expected = DataFrame() | ||
tm.assert_frame_equal(result, expected) | ||
|
||
|
||
class TestExpanding(Base): | ||
|
||
|
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 think "datetime rolling window" (bit of a weird name).