File tree Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Expand file tree Collapse file tree 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
@@ -6364,29 +6363,11 @@ def combine_first(self, other: DataFrame) -> DataFrame:
6364
6363
"""
6365
6364
import pandas .core .computation .expressions as expressions
6366
6365
6367
- def extract_values (arr ):
6368
- # Does two things:
6369
- # 1. maybe gets the values from the Series / Index
6370
- # 2. convert datelike to i8
6371
- # TODO: extract_array?
6372
- if isinstance (arr , (Index , Series )):
6373
- arr = arr ._values
6374
-
6375
- if needs_i8_conversion (arr .dtype ):
6376
- if is_extension_array_dtype (arr .dtype ):
6377
- arr = arr .asi8
6378
- else :
6379
- arr = arr .view ("i8" )
6380
- return arr
6381
-
6382
6366
def combiner (x , y ):
6383
- mask = isna (x )
6384
- # TODO: extract_array?
6385
- if isinstance (mask , (Index , Series )):
6386
- mask = mask ._values
6367
+ mask = extract_array (isna (x ))
6387
6368
6388
- x_values = extract_values (x )
6389
- y_values = extract_values (y )
6369
+ x_values = extract_array (x )
6370
+ y_values = extract_array (y )
6390
6371
6391
6372
# If the column y in other DataFrame is not in first DataFrame,
6392
6373
# just return y_values.
You can’t perform that action at this time.
0 commit comments