-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Series.resample performance with datetime64[ns] #7754 #10057
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
hmm, would need a benchmark, e.g. post a sample timeit for before/after (on a good sized test frame) |
import pandas as pd
intSeries = pd.Series(5, pd.date_range(start='2000-01-01', end='2000-01-08', freq='555000U'), dtype='int64')
timeSeries = intSeries.astype('datetime64[ns]')
%timeit intSeries.resample('1S', how='last')
%timeit timeSeries.resample('1S', how='last')
%prun intSeries.resample('1S', how='last')
%prun timeSeries.resample('1S', how='last') Before100 loops, best of 3: 18.8 ms per loop After100 loops, best of 3: 19 ms per loop |
ok, looks ok, can you add a vbench in |
Added test. @jreback please review again.
|
Updated whatsnew/v0.17.0.txt. |
looks good ping when green |
on green! :) @jreback |
ENH: Series.resample performance with datetime64[ns] #7754
ty! |
It fixes the performance drop.
See %timeit result here.
closes #7754
@jreback Would you review this PR? Thanks!