Closed
Description
In [21]: df = DataFrame(np.random.randn(100000,2),index=date_range('20130101',periods=100000,freq='50L'))
In [19]: %timeit df.resample('1s',how=np.max)[0]
1 loops, best of 3: 902 ms per loop
mean is ok
In [22]: %timeit df.resample('1s',how=np.mean)[0]
100 loops, best of 3: 2.42 ms per loop
The way to do this actually is ohlc
In [20]: %timeit df.groupby(pd.TimeGrouper('1s'))[0].ohlc()
1000 loops, best of 3: 1.16 ms per loop