@@ -330,7 +330,8 @@ def _apply_columns(self, func):
330
330
331
331
return self ._constructor (
332
332
data = new_data , index = self .index , columns = self .columns ,
333
- default_fill_value = self .default_fill_value ).__finalize__ (self )
333
+ default_fill_value = self .default_fill_value ,
334
+ default_kind = self .default_kind ).__finalize__ (self )
334
335
335
336
def astype (self , dtype ):
336
337
return self ._apply_columns (lambda x : x .astype (dtype ))
@@ -576,7 +577,8 @@ def _combine_frame(self, other, func, fill_value=None, level=None):
576
577
577
578
return self ._constructor (data = new_data , index = new_index ,
578
579
columns = new_columns ,
579
- default_fill_value = new_fill_value
580
+ default_fill_value = new_fill_value ,
581
+ default_kind = self .default_kind ,
580
582
).__finalize__ (self )
581
583
582
584
def _combine_match_index (self , other , func , level = None ):
@@ -605,7 +607,8 @@ def _combine_match_index(self, other, func, level=None):
605
607
606
608
return self ._constructor (
607
609
new_data , index = new_index , columns = self .columns ,
608
- default_fill_value = fill_value ).__finalize__ (self )
610
+ default_fill_value = fill_value ,
611
+ default_kind = self .default_kind ).__finalize__ (self )
609
612
610
613
def _combine_match_columns (self , other , func , level = None , try_cast = True ):
611
614
# patched version of DataFrame._combine_match_columns to account for
@@ -629,7 +632,8 @@ def _combine_match_columns(self, other, func, level=None, try_cast=True):
629
632
630
633
return self ._constructor (
631
634
new_data , index = self .index , columns = union ,
632
- default_fill_value = self .default_fill_value ).__finalize__ (self )
635
+ default_fill_value = self .default_fill_value ,
636
+ default_kind = self .default_kind ).__finalize__ (self )
633
637
634
638
def _combine_const (self , other , func , errors = 'raise' , try_cast = True ):
635
639
return self ._apply_columns (lambda x : func (x , other ))
@@ -673,7 +677,8 @@ def _reindex_index(self, index, method, copy, level, fill_value=np.nan,
673
677
674
678
return self ._constructor (
675
679
new_series , index = index , columns = self .columns ,
676
- default_fill_value = self ._default_fill_value ).__finalize__ (self )
680
+ default_fill_value = self ._default_fill_value ,
681
+ default_kind = self .default_kind ).__finalize__ (self )
677
682
678
683
def _reindex_columns (self , columns , method , copy , level , fill_value = None ,
679
684
limit = None , takeable = False ):
@@ -693,7 +698,8 @@ def _reindex_columns(self, columns, method, copy, level, fill_value=None,
693
698
sdict = {k : v for k , v in compat .iteritems (self ) if k in columns }
694
699
return self ._constructor (
695
700
sdict , index = self .index , columns = columns ,
696
- default_fill_value = self ._default_fill_value ).__finalize__ (self )
701
+ default_fill_value = self ._default_fill_value ,
702
+ default_kind = self .default_kind ).__finalize__ (self )
697
703
698
704
def _reindex_with_indexers (self , reindexers , method = None , fill_value = None ,
699
705
limit = None , copy = False , allow_dups = False ):
@@ -725,8 +731,10 @@ def _reindex_with_indexers(self, reindexers, method=None, fill_value=None,
725
731
else :
726
732
new_arrays [col ] = self [col ]
727
733
728
- return self ._constructor (new_arrays , index = index ,
729
- columns = columns ).__finalize__ (self )
734
+ return self ._constructor (
735
+ new_arrays , index = index , columns = columns ,
736
+ default_fill_value = self .default_fill_value ,
737
+ default_kind = self .default_kind ).__finalize__ (self )
730
738
731
739
def _join_compat (self , other , on = None , how = 'left' , lsuffix = '' , rsuffix = '' ,
732
740
sort = False ):
0 commit comments