File tree 1 file changed +3
-22
lines changed
1 file changed +3
-22
lines changed Original file line number Diff line number Diff line change 114
114
is_object_dtype ,
115
115
is_scalar ,
116
116
is_sequence ,
117
- needs_i8_conversion ,
118
117
pandas_dtype ,
119
118
)
120
119
from pandas .core .dtypes .missing import isna , notna
@@ -6374,29 +6373,11 @@ def combine_first(self, other: DataFrame) -> DataFrame:
6374
6373
"""
6375
6374
import pandas .core .computation .expressions as expressions
6376
6375
6377
- def extract_values (arr ):
6378
- # Does two things:
6379
- # 1. maybe gets the values from the Series / Index
6380
- # 2. convert datelike to i8
6381
- # TODO: extract_array?
6382
- if isinstance (arr , (Index , Series )):
6383
- arr = arr ._values
6384
-
6385
- if needs_i8_conversion (arr .dtype ):
6386
- if is_extension_array_dtype (arr .dtype ):
6387
- arr = arr .asi8
6388
- else :
6389
- arr = arr .view ("i8" )
6390
- return arr
6391
-
6392
6376
def combiner (x , y ):
6393
- mask = isna (x )
6394
- # TODO: extract_array?
6395
- if isinstance (mask , (Index , Series )):
6396
- mask = mask ._values
6377
+ mask = extract_array (isna (x ))
6397
6378
6398
- x_values = extract_values ( x )
6399
- y_values = extract_values ( y )
6379
+ x_values = extract_array ( x , extract_numpy = True )
6380
+ y_values = extract_array ( y , extract_numpy = True )
6400
6381
6401
6382
# If the column y in other DataFrame is not in first DataFrame,
6402
6383
# just return y_values.
You can’t perform that action at this time.
0 commit comments