Skip to content
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

Fix #12037 Error when Resampling using pd.tseries.offsets.Nano as period #12270

Closed
wants to merge 2 commits into from
Closed

Conversation

BranYang
Copy link
Contributor

@BranYang BranYang commented Feb 9, 2016

Closes #12037

ts = pd.Series(np.random.randn(len(indx)), index=indx)
r = ts.resample(pd.tseries.offsets.Nano(100))
r.agg('mean')

Copy link
Contributor

Choose a reason for hiding this comment

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

you need to have an expected as a comparison

@jreback jreback added Bug Resample resample method labels Feb 9, 2016
@@ -854,9 +854,11 @@ def _get_time_bins(self, ax):
closed=self.closed,
base=self.base)
tz = ax.tz
# do not call replace() because that will swallow the nanosecond part
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a better comment as once we delete .replace its not clear what you are doing.

@jreback
Copy link
Contributor

jreback commented Feb 9, 2016

looks reasonable, some comments. pls add a whatsnew entry.

@BranYang
Copy link
Contributor Author

@jreback

@jreback jreback closed this in ab29f93 Feb 10, 2016
@BranYang BranYang deleted the nanosec branch February 10, 2016 23:06
cldy pushed a commit to cldy/pandas that referenced this pull request Feb 11, 2016
…ano as period

Closes pandas-dev#12037

Author: Bran Yang <snowolfy@163.com>

Closes pandas-dev#12270 from BranYang/nanosec and squashes the following commits:

bff0c85 [Bran Yang] Add to whatsnew and some comments
fd0b307 [Bran Yang] Fix pandas-dev#12037 Error when Resampling using pd.tseries.offsets.Nano as period
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants