Skip to content

Commit

Permalink
TST add vbench for groupby nth
Browse files Browse the repository at this point in the history
  • Loading branch information
hayd committed Mar 7, 2014
1 parent c444c73 commit feaca40
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vb_suite/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,22 @@ def f(g):
groupby_frame_apply = Benchmark("df.groupby(['key', 'key2']).apply(f)", setup,
start_date=datetime(2011, 10, 1))


#----------------------------------------------------------------------
# DataFrame nth

setup = common_setup + """
df = pd.DataFrame(np.random.randint(1, 100, (10000, 2)))
"""

# Not really a fair test as behaviour has changed!
groupby_frame_nth = Benchmark("df.groupby(0).nth(0)", setup,
start_date=datetime(2014, 3, 1))

groupby_series_nth = Benchmark("df[1].groupby(df[0]).nth(0)", setup,
start_date=datetime(2014, 3, 1))


#----------------------------------------------------------------------
# Sum booleans #2692

Expand Down

0 comments on commit feaca40

Please sign in to comment.