-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Add test to validate resampling GH9915 #12913
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
This shows |
Timestamp('2015-03-31 21:50:52.806000'): 3 | ||
} | ||
) | ||
result = s.resample("10S") |
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.
specify this a s.resample('10s').mean()
; yes this works but hows a deprecation warning.
further just make an expected series and use assert_series_equal
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 see. Updated
def test_resample_how_method(self): | ||
# GH9915 | ||
s = pd.Series( | ||
{ |
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.
generally easier to write this with an explicit conversion
In [2]: s = pd.Series([11, 12], pd.to_datetime(['2015-03-31 21:48:52.672000', '2015-03-31 21:49:52.739000']))
In [3]: s
Out[3]:
2015-03-31 21:48:52.672 11
2015-03-31 21:49:52.739 12
dtype: int64
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.
Updated
lgtm. ping when green. |
thanks! |
git diff upstream/master | flake8 --diff