File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,29 @@ def setup(self):
118118 self .a = pd .Categorical (list ("aabbcd" ) * N )
119119 self .b = pd .Categorical (list ("bbcdjk" ) * N )
120120
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+
121126 def time_concat (self ):
122127 pd .concat ([self .s , self .s ])
123128
124129 def time_union (self ):
125130 union_categoricals ([self .a , self .b ])
126131
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+
127144
128145class ValueCounts :
129146
You can’t perform that action at this time.
0 commit comments