@@ -5279,24 +5279,17 @@ def _arith_op(left, right):
5279
5279
new_data = dispatch_fill_zeros (func , this .values , other .values , res_values )
5280
5280
return this ._construct_result (new_data )
5281
5281
5282
- def _combine_match_index (self , other , func , level = None ):
5283
- left , right = self .align (other , join = "outer" , axis = 0 , level = level , copy = False )
5284
- # at this point we have `left.index.equals(right.index)`
5282
+ def _combine_match_index (self , other , func ):
5283
+ # at this point we have `self.index.equals(other.index)`
5285
5284
5286
- if left ._is_mixed_type or right ._is_mixed_type :
5285
+ if self ._is_mixed_type or other ._is_mixed_type :
5287
5286
# operate column-wise; avoid costly object-casting in `.values`
5288
- new_data = ops .dispatch_to_series (left , right , func )
5287
+ new_data = ops .dispatch_to_series (self , other , func )
5289
5288
else :
5290
5289
# fastpath --> operate directly on values
5291
5290
with np .errstate (all = "ignore" ):
5292
- new_data = func (left .values .T , right .values ).T
5293
- return left ._construct_result (new_data )
5294
-
5295
- def _combine_match_columns (self , other : Series , func , level = None ):
5296
- left , right = self .align (other , join = "outer" , axis = 1 , level = level , copy = False )
5297
- # at this point we have `left.columns.equals(right.index)`
5298
- new_data = ops .dispatch_to_series (left , right , func , axis = "columns" )
5299
- return left ._construct_result (new_data )
5291
+ new_data = func (self .values .T , other .values ).T
5292
+ return new_data
5300
5293
5301
5294
def _construct_result (self , result ) -> "DataFrame" :
5302
5295
"""
0 commit comments