@@ -146,7 +146,8 @@ def f():
146146"""
147147
148148groupby_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 ))
150151#----------------------------------------------------------------------
151152# Series.value_counts
152153
@@ -180,11 +181,11 @@ def f():
180181ind2 = np.random.randint(0, 2, size=100000)
181182
182183df = 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)})
188189"""
189190
190191stmt = "df.pivot_table(rows='key1', cols=['key2', 'key3'])"
@@ -221,13 +222,13 @@ def f():
221222 start_date = datetime (2012 , 5 , 1 ))
222223
223224groupby_first_float32 = Benchmark ('data2.groupby(labels).first()' , setup ,
224- start_date = datetime (2013 , 1 , 1 ))
225+ start_date = datetime (2013 , 1 , 1 ))
225226
226227groupby_last = Benchmark ('data.groupby(labels).last()' , setup ,
227228 start_date = datetime (2012 , 5 , 1 ))
228229
229230groupby_last_float32 = Benchmark ('data2.groupby(labels).last()' , setup ,
230- start_date = datetime (2013 , 1 , 1 ))
231+ start_date = datetime (2013 , 1 , 1 ))
231232
232233
233234#----------------------------------------------------------------------
@@ -285,9 +286,9 @@ def f():
285286labels = np.random.randint(0, 2000, size=N)
286287labels2 = np.random.randint(0, 3, size=N)
287288df = 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)})
291292def f(g):
292293 return 1
293294"""
0 commit comments