Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Add test to validate resampling GH9915 #12913

wants to merge 1 commit into from

Conversation

gliptak
Copy link
Contributor

@gliptak gliptak commented Apr 17, 2016

@gliptak
Copy link
Contributor Author

gliptak commented Apr 17, 2016

This shows FutureWarning: .resample() is now a deferred operation use .resample(...).mean() instead of .resample(...) in the IDE ...

Timestamp('2015-03-31 21:50:52.806000'): 3
}
)
result = s.resample("10S")
Copy link
Contributor

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

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 see. Updated

@jreback jreback added Testing pandas testing functions or related to the test suite Resample resample method labels Apr 17, 2016
@jreback jreback added this to the 0.18.1 milestone Apr 17, 2016
def test_resample_how_method(self):
# GH9915
s = pd.Series(
{
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@jreback
Copy link
Contributor

jreback commented Apr 17, 2016

lgtm. ping when green.

@jreback
Copy link
Contributor

jreback commented Apr 17, 2016

thanks!

@jreback jreback closed this in b585b5a Apr 17, 2016
@gliptak gliptak deleted the resample1 branch April 17, 2016 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resample resample method Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resampling produces all NaN values for a particular dataset
2 participants