def combine_first(self, other):
import pandas.core.computation.expressions as expressions<EOL>def extract_values(arr):<EOL><INDENT>if isinstance(arr, (ABCIndexClass, ABCSeries)):<EOL><INDENT>arr = arr._values<EOL><DEDENT>if needs_i8_conversion(arr):<EOL><INDENT>if is_extension_array_dtype(arr.dtype):<EOL><INDENT>arr = arr.asi8<EOL><DEDENT>else:<EOL><INDENT>arr = arr.view('<STR_LIT>')<EOL><DEDENT><DEDENT>return arr<EOL><DEDENT>def combiner(x, y):<EOL><INDENT>mask = isna(x)<EOL>if isinstance(mask, (ABCIndexClass, ABCSeries)):<EOL><INDENT>mask = mask._values<EOL><DEDENT>x_values = extract_values(x)<EOL>y_values = extract_values(y)<EOL>if y.name not in self.columns:<EOL><INDENT>return y_values<EOL><DEDENT>return expressions.where(mask, y_values, x_values)<EOL><DEDENT>return self.combine(other, combiner, overwrite=False)<EOL>
Update null elements with value in the same location in `other`.

Combine two DataFrame objects by filling null values in one DataFrame
with non-null values from other DataFrame. The row and column indexes
of the resulting DataFrame will be the union of the two.

Parameters
----------
other : DataFrame
    Provided DataFrame to use to fill null values.

Returns
-------
DataFrame

See Also
--------
DataFrame.combine : Perform series-wise operation on two DataFrames
    using a given function.

Examples
--------

>>> df1 = pd.DataFrame({'A': [None, 0], 'B': [None, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]})
>>> df1.combine_first(df2)
     A    B
0  1.0  3.0
1  0.0  4.0

Null values still persist if the location of that null value
does not exist in `other`

>>> df1 = pd.DataFrame({'A': [None, 0], 'B': [4, None]})
>>> df2 = pd.DataFrame({'B': [3, 3], 'C': [1, 1]}, index=[1, 2])
>>> df1.combine_first(df2)
     A    B    C
0  NaN  4.0  NaN
1  0.0  3.0  1.0
2  NaN  3.0  1.0