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

BUG: resample in single group case not using how passed function #3849

Closed
jreback opened this issue Jun 11, 2013 · 0 comments · Fixed by #4494
Closed

BUG: resample in single group case not using how passed function #3849

jreback opened this issue Jun 11, 2013 · 0 comments · Fixed by #4494
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jun 11, 2013

In [34]: s = Series([30.1,31.6],index=[Timestamp('20070915 15:30:00'),Timestamp('20070915 15:40:00')])

In [35]: s
Out[35]: 
2007-09-15 15:30:00    30.1
2007-09-15 15:40:00    31.6
dtype: float64

In [36]: s.resample('D',how=lambda x: np.std(x))
Out[36]: 
2007-09-15   NaN
Freq: D, dtype: float64

In [37]: s.groupby(pd.TimeGrouper('D')).apply(lambda x: np.std(x))
Out[37]: 
2007-09-15    0.75
dtype: float64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant