@@ -146,7 +146,8 @@ def f():
146
146
"""
147
147
148
148
groupby_multi_count = Benchmark ("df.groupby(['key1', 'key2']).count()" ,
149
- setup , start_date = datetime (2014 , 5 , 5 ))
149
+ setup , name = 'groupby_multi_count' ,
150
+ start_date = datetime (2014 , 5 , 5 ))
150
151
#----------------------------------------------------------------------
151
152
# Series.value_counts
152
153
@@ -180,11 +181,11 @@ def f():
180
181
ind2 = np.random.randint(0, 2, size=100000)
181
182
182
183
df = DataFrame({'key1': fac1.take(ind1),
183
- 'key2': fac2.take(ind2),
184
- 'key3': fac2.take(ind2),
185
- 'value1' : np.random.randn(100000),
186
- 'value2' : np.random.randn(100000),
187
- 'value3' : np.random.randn(100000)})
184
+ 'key2': fac2.take(ind2),
185
+ 'key3': fac2.take(ind2),
186
+ 'value1' : np.random.randn(100000),
187
+ 'value2' : np.random.randn(100000),
188
+ 'value3' : np.random.randn(100000)})
188
189
"""
189
190
190
191
stmt = "df.pivot_table(rows='key1', cols=['key2', 'key3'])"
@@ -221,13 +222,13 @@ def f():
221
222
start_date = datetime (2012 , 5 , 1 ))
222
223
223
224
groupby_first_float32 = Benchmark ('data2.groupby(labels).first()' , setup ,
224
- start_date = datetime (2013 , 1 , 1 ))
225
+ start_date = datetime (2013 , 1 , 1 ))
225
226
226
227
groupby_last = Benchmark ('data.groupby(labels).last()' , setup ,
227
228
start_date = datetime (2012 , 5 , 1 ))
228
229
229
230
groupby_last_float32 = Benchmark ('data2.groupby(labels).last()' , setup ,
230
- start_date = datetime (2013 , 1 , 1 ))
231
+ start_date = datetime (2013 , 1 , 1 ))
231
232
232
233
233
234
#----------------------------------------------------------------------
@@ -285,9 +286,9 @@ def f():
285
286
labels = np.random.randint(0, 2000, size=N)
286
287
labels2 = np.random.randint(0, 3, size=N)
287
288
df = DataFrame({'key': labels,
288
- 'key2': labels2,
289
- 'value1': randn(N),
290
- 'value2': ['foo', 'bar', 'baz', 'qux'] * (N / 4)})
289
+ 'key2': labels2,
290
+ 'value1': randn(N),
291
+ 'value2': ['foo', 'bar', 'baz', 'qux'] * (N / 4)})
291
292
def f(g):
292
293
return 1
293
294
"""
0 commit comments