@@ -323,7 +323,8 @@ def _apply_columns(self, func):
323
323
324
324
return self ._constructor (
325
325
data = new_data , index = self .index , columns = self .columns ,
326
- default_fill_value = self .default_fill_value ).__finalize__ (self )
326
+ default_fill_value = self .default_fill_value ,
327
+ default_kind = self .default_kind ).__finalize__ (self )
327
328
328
329
def astype (self , dtype ):
329
330
return self ._apply_columns (lambda x : x .astype (dtype ))
@@ -580,7 +581,8 @@ def _combine_frame(self, other, func, fill_value=None, level=None):
580
581
581
582
return self ._constructor (data = new_data , index = new_index ,
582
583
columns = new_columns ,
583
- default_fill_value = new_fill_value
584
+ default_fill_value = new_fill_value ,
585
+ default_kind = self .default_kind ,
584
586
).__finalize__ (self )
585
587
586
588
def _combine_match_index (self , other , func , level = None ):
@@ -610,7 +612,8 @@ def _combine_match_index(self, other, func, level=None):
610
612
611
613
return self ._constructor (
612
614
new_data , index = new_index , columns = self .columns ,
613
- default_fill_value = fill_value ).__finalize__ (self )
615
+ default_fill_value = fill_value ,
616
+ default_kind = self .default_kind ).__finalize__ (self )
614
617
615
618
def _combine_match_columns (self , other , func , level = None , try_cast = True ):
616
619
# patched version of DataFrame._combine_match_columns to account for
@@ -634,7 +637,8 @@ def _combine_match_columns(self, other, func, level=None, try_cast=True):
634
637
635
638
return self ._constructor (
636
639
new_data , index = self .index , columns = union ,
637
- default_fill_value = self .default_fill_value ).__finalize__ (self )
640
+ default_fill_value = self .default_fill_value ,
641
+ default_kind = self .default_kind ).__finalize__ (self )
638
642
639
643
def _combine_const (self , other , func , errors = 'raise' , try_cast = True ):
640
644
return self ._apply_columns (lambda x : func (x , other ))
@@ -678,7 +682,8 @@ def _reindex_index(self, index, method, copy, level, fill_value=np.nan,
678
682
679
683
return self ._constructor (
680
684
new_series , index = index , columns = self .columns ,
681
- default_fill_value = self ._default_fill_value ).__finalize__ (self )
685
+ default_fill_value = self ._default_fill_value ,
686
+ default_kind = self .default_kind ).__finalize__ (self )
682
687
683
688
def _reindex_columns (self , columns , method , copy , level , fill_value = None ,
684
689
limit = None , takeable = False ):
@@ -698,7 +703,8 @@ def _reindex_columns(self, columns, method, copy, level, fill_value=None,
698
703
sdict = {k : v for k , v in compat .iteritems (self ) if k in columns }
699
704
return self ._constructor (
700
705
sdict , index = self .index , columns = columns ,
701
- default_fill_value = self ._default_fill_value ).__finalize__ (self )
706
+ default_fill_value = self ._default_fill_value ,
707
+ default_kind = self .default_kind ).__finalize__ (self )
702
708
703
709
def _reindex_with_indexers (self , reindexers , method = None , fill_value = None ,
704
710
limit = None , copy = False , allow_dups = False ):
@@ -727,8 +733,10 @@ def _reindex_with_indexers(self, reindexers, method=None, fill_value=None,
727
733
else :
728
734
new_arrays [col ] = self [col ]
729
735
730
- return self ._constructor (new_arrays , index = index ,
731
- columns = columns ).__finalize__ (self )
736
+ return self ._constructor (
737
+ new_arrays , index = index , columns = columns ,
738
+ default_fill_value = self .default_fill_value ,
739
+ default_kind = self .default_kind ).__finalize__ (self )
732
740
733
741
def _join_compat (self , other , on = None , how = 'left' , lsuffix = '' , rsuffix = '' ,
734
742
sort = False ):
0 commit comments