File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,19 @@ def f():
119
119
setup , start_date = datetime (2011 , 10 , 1 ))
120
120
121
121
#----------------------------------------------------------------------
122
+ # count() speed
123
+
124
+ setup = common_setup + """
125
+ df = DataFrame({'key1': np.random.randint(0, 500, size=100000),
126
+ 'key2': np.random.randint(0, 100, size=100000),
127
+ 'value1' : np.random.randn(100000),
128
+ 'value2' : np.random.randn(100000),
129
+ 'value3' : np.random.randn(100000)})
130
+ """
131
+
132
+ groupby_multi_count = Benchmark ("df.groupby(['key1', 'key2']).count()" ,
133
+ setup , start_date = datetime (2014 , 5 , 1 ))
134
+ #----------------------------------------------------------------------
122
135
# Series.value_counts
123
136
124
137
setup = common_setup + """
You can’t perform that action at this time.
0 commit comments