File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4297,13 +4297,13 @@ def append(self, other):
4297
4297
4298
4298
return self ._concat (to_concat , name )
4299
4299
4300
- def _concat (self , to_concat , name ) :
4300
+ def _concat (self , to_concat : List [ "Index" ] , name : Label ) -> "Index" :
4301
4301
"""
4302
4302
Concatenate multiple Index objects.
4303
4303
"""
4304
- to_concat = [x ._values if isinstance ( x , Index ) else x for x in to_concat ]
4304
+ to_concat_vals = [x ._values for x in to_concat ]
4305
4305
4306
- result = concat_compat (to_concat )
4306
+ result = concat_compat (to_concat_vals )
4307
4307
return Index (result , name = name )
4308
4308
4309
4309
def putmask (self , mask , value ):
Original file line number Diff line number Diff line change @@ -653,7 +653,7 @@ def map(self, mapper):
653
653
mapped = self ._values .map (mapper )
654
654
return Index (mapped , name = self .name )
655
655
656
- def _concat (self , to_concat , name ) :
656
+ def _concat (self , to_concat : List [ "Index" ] , name : Label ) -> "CategoricalIndex" :
657
657
# if calling index is category, don't check dtype of others
658
658
codes = np .concatenate ([self ._is_dtype_compat (c ).codes for c in to_concat ])
659
659
cat = self ._data ._from_backing_data (codes )
You can’t perform that action at this time.
0 commit comments