We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c444c73 commit feaca40Copy full SHA for feaca40
vb_suite/groupby.py
@@ -269,6 +269,22 @@ def f(g):
269
groupby_frame_apply = Benchmark("df.groupby(['key', 'key2']).apply(f)", setup,
270
start_date=datetime(2011, 10, 1))
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
286
287
288
#----------------------------------------------------------------------
289
# Sum booleans #2692
290
0 commit comments