@@ -243,3 +243,29 @@ def date_range(start=None, end=None, periods=None, freq=None):
243
243
setup , start_date = datetime (2013 , 9 , 30 ))
244
244
245
245
246
+ #----------------------------------------------------------------------
247
+ # Resampling: fast-path various functions
248
+
249
+ setup = common_setup + """
250
+ rng = date_range('20130101',periods=100000,freq='50L')
251
+ df = DataFrame(np.random.randn(100000,2),index=rng)
252
+ """
253
+
254
+ dataframe_resample_mean_string = \
255
+ Benchmark ("df.resample('1s', how='mean')" , setup )
256
+
257
+ dataframe_resample_mean_numpy = \
258
+ Benchmark ("df.resample('1s', how=np.mean)" , setup )
259
+
260
+ dataframe_resample_min_string = \
261
+ Benchmark ("df.resample('1s', how='min')" , setup )
262
+
263
+ dataframe_resample_min_numpy = \
264
+ Benchmark ("df.resample('1s', how=np.min)" , setup )
265
+
266
+ dataframe_resample_max_string = \
267
+ Benchmark ("df.resample('1s', how='max')" , setup )
268
+
269
+ dataframe_resample_max_numpy = \
270
+ Benchmark ("df.resample('1s', how=np.max)" , setup )
271
+
0 commit comments