File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,22 @@ def f(g):
269
269
groupby_frame_apply = Benchmark ("df.groupby(['key', 'key2']).apply(f)" , setup ,
270
270
start_date = datetime (2011 , 10 , 1 ))
271
271
272
+
273
+ #----------------------------------------------------------------------
274
+ # DataFrame nth
275
+
276
+ setup = common_setup + """
277
+ df = pd.DataFrame(np.random.randint(1, 100, (10000, 2)))
278
+ """
279
+
280
+ # Not really a fair test as behaviour has changed!
281
+ groupby_frame_nth = Benchmark ("df.groupby(0).nth(0)" , setup ,
282
+ start_date = datetime (2014 , 3 , 1 ))
283
+
284
+ groupby_series_nth = Benchmark ("df[1].groupby(df[0]).nth(0)" , setup ,
285
+ start_date = datetime (2014 , 3 , 1 ))
286
+
287
+
272
288
#----------------------------------------------------------------------
273
289
# Sum booleans #2692
274
290
You can’t perform that action at this time.
0 commit comments