@@ -2801,12 +2801,12 @@ def _combine_series(self, other, func, fill_value=None, axis=None,
2801
2801
if axis is not None :
2802
2802
axis = self ._get_axis_name (axis )
2803
2803
if axis == 'index' :
2804
- return self ._combine_match_index (other , func , fill_value )
2804
+ return self ._combine_match_index (other , func , level = level , fill_value = fill_value )
2805
2805
else :
2806
- return self ._combine_match_columns (other , func , fill_value )
2807
- return self ._combine_series_infer (other , func , fill_value )
2806
+ return self ._combine_match_columns (other , func , level = level , fill_value = fill_value )
2807
+ return self ._combine_series_infer (other , func , level = level , fill_value = fill_value )
2808
2808
2809
- def _combine_series_infer (self , other , func , fill_value = None ):
2809
+ def _combine_series_infer (self , other , func , level = None , fill_value = None ):
2810
2810
if len (other ) == 0 :
2811
2811
return self * NA
2812
2812
@@ -2822,21 +2822,21 @@ def _combine_series_infer(self, other, func, fill_value=None):
2822
2822
"DataFrame.<op> to explicitly broadcast arithmetic "
2823
2823
"operations along the index" ),
2824
2824
FutureWarning )
2825
- return self ._combine_match_index (other , func , fill_value )
2825
+ return self ._combine_match_index (other , func , level = level , fill_value = fill_value )
2826
2826
else :
2827
- return self ._combine_match_columns (other , func , fill_value )
2827
+ return self ._combine_match_columns (other , func , level = level , fill_value = fill_value )
2828
2828
2829
- def _combine_match_index (self , other , func , fill_value = None ):
2830
- left , right = self .align (other , join = 'outer' , axis = 0 , copy = False )
2829
+ def _combine_match_index (self , other , func , level = None , fill_value = None ):
2830
+ left , right = self .align (other , join = 'outer' , axis = 0 , level = level , copy = False )
2831
2831
if fill_value is not None :
2832
2832
raise NotImplementedError ("fill_value %r not supported." %
2833
2833
fill_value )
2834
2834
return self ._constructor (func (left .values .T , right .values ).T ,
2835
2835
index = left .index ,
2836
2836
columns = self .columns , copy = False )
2837
2837
2838
- def _combine_match_columns (self , other , func , fill_value = None ):
2839
- left , right = self .align (other , join = 'outer' , axis = 1 , copy = False )
2838
+ def _combine_match_columns (self , other , func , level = None , fill_value = None ):
2839
+ left , right = self .align (other , join = 'outer' , axis = 1 , level = level , copy = False )
2840
2840
if fill_value is not None :
2841
2841
raise NotImplementedError ("fill_value %r not supported" %
2842
2842
fill_value )
0 commit comments