File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,29 @@ def setup(self):
118
118
self .a = pd .Categorical (list ("aabbcd" ) * N )
119
119
self .b = pd .Categorical (list ("bbcdjk" ) * N )
120
120
121
+ self .idx_a = pd .CategoricalIndex (range (N ), range (N ))
122
+ self .idx_b = pd .CategoricalIndex (range (N + 1 ), range (N + 1 ))
123
+ self .df_a = pd .DataFrame (range (N ), columns = ["a" ], index = self .idx_a )
124
+ self .df_b = pd .DataFrame (range (N + 1 ), columns = ["a" ], index = self .idx_b )
125
+
121
126
def time_concat (self ):
122
127
pd .concat ([self .s , self .s ])
123
128
124
129
def time_union (self ):
125
130
union_categoricals ([self .a , self .b ])
126
131
132
+ def time_append_overlapping_index (self ):
133
+ self .idx_a .append (self .idx_a )
134
+
135
+ def time_append_non_overlapping_index (self ):
136
+ self .idx_a .append (self .idx_b )
137
+
138
+ def time_concat_overlapping_index (self ):
139
+ pd .concat ([self .df_a , self .df_a ])
140
+
141
+ def time_concat_non_overlapping_index (self ):
142
+ pd .concat ([self .df_a , self .df_b ])
143
+
127
144
128
145
class ValueCounts :
129
146
You can’t perform that action at this time.
0 commit comments