We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4db9a2f commit c38b168Copy full SHA for c38b168
asv_bench/benchmarks/groupby.py
@@ -16,10 +16,10 @@ class ApplyDictReturn(object):
16
def setup(self):
17
self.labels = np.arange(1000).repeat(10)
18
self.data = Series(np.random.randn(len(self.labels)))
19
- self.f = lambda x: {'first': x.values[0], 'last': x.values[(-1)]}
20
21
def time_groupby_apply_dict_return(self):
22
- self.data.groupby(self.labels).apply(self.f)
+ self.data.groupby(self.labels).apply(lambda x: {'first': x.values[0],
+ 'last': x.values[-1]})
23
24
25
class Apply(object):
0 commit comments