def combine_first(self, other: 'DataFrame') -> 'DataFrame':
    '\n        Update null elements with value in the same location in `other`.\n\n        Combine two DataFrame objects by filling null values in one DataFrame\n        with non-null values from other DataFrame. The row and column indexes\n        of the resulting DataFrame will be the union of the two.\n\n        .. versionadded:: 3.3.0\n\n        Parameters\n        ----------\n        other : DataFrame\n            Provided DataFrame to use to fill null values.\n\n        Returns\n        -------\n        DataFrame\n\n        Examples\n        --------\n        >>> ps.set_option("compute.ops_on_diff_frames", True)\n        >>> df1 = ps.DataFrame({\'A\': [None, 0], \'B\': [None, 4]})\n        >>> df2 = ps.DataFrame({\'A\': [1, 1], \'B\': [3, 3]})\n\n        >>> df1.combine_first(df2).sort_index()\n             A    B\n        0  1.0  3.0\n        1  0.0  4.0\n\n        Null values still persist if the location of that null value does not exist in other\n\n        >>> df1 = ps.DataFrame({\'A\': [None, 0], \'B\': [4, None]})\n        >>> df2 = ps.DataFrame({\'B\': [3, 3], \'C\': [1, 1]}, index=[1, 2])\n\n        >>> df1.combine_first(df2).sort_index()\n             A    B    C\n        0  NaN  4.0  NaN\n        1  0.0  3.0  1.0\n        2  NaN  3.0  1.0\n        >>> ps.reset_option("compute.ops_on_diff_frames")\n        '
    if (not isinstance(other, DataFrame)):
        raise TypeError('`combine_first` only allows `DataFrame` for parameter `other`')
    if same_anchor(self, other):
        combined = self
        this = self
        that = other
    else:
        combined = combine_frames(self, other)
        this = combined['this']
        that = combined['that']
    intersect_column_labels = set(self._internal.column_labels).intersection(set(other._internal.column_labels))
    (column_labels, data_spark_columns) = ([], [])
    for column_label in this._internal.column_labels:
        this_scol = this._internal.spark_column_for(column_label)
        if (column_label in intersect_column_labels):
            that_scol = that._internal.spark_column_for(column_label)
            this_scol_name = this._internal.spark_column_name_for(column_label)
            combined_scol = F.when(this_scol.isNull(), that_scol).otherwise(this_scol).alias(this_scol_name)
            data_spark_columns.append(combined_scol)
        else:
            data_spark_columns.append(this_scol)
        column_labels.append(column_label)
    for column_label in that._internal.column_labels:
        if (column_label not in intersect_column_labels):
            that_scol = that._internal.spark_column_for(column_label)
            data_spark_columns.append(that_scol)
            column_labels.append(column_label)
    internal = combined._internal.copy(column_labels=column_labels, data_spark_columns=data_spark_columns, data_fields=None, column_label_names=self._internal.column_label_names)
    return DataFrame(internal)
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.

.. versionadded:: 3.3.0

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

Returns
-------
DataFrame

Examples
--------
>>> ps.set_option("compute.ops_on_diff_frames", True)
>>> df1 = ps.DataFrame({'A': [None, 0], 'B': [None, 4]})
>>> df2 = ps.DataFrame({'A': [1, 1], 'B': [3, 3]})

>>> df1.combine_first(df2).sort_index()
     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 = ps.DataFrame({'A': [None, 0], 'B': [4, None]})
>>> df2 = ps.DataFrame({'B': [3, 3], 'C': [1, 1]}, index=[1, 2])

>>> df1.combine_first(df2).sort_index()
     A    B    C
0  NaN  4.0  NaN
1  0.0  3.0  1.0
2  NaN  3.0  1.0
>>> ps.reset_option("compute.ops_on_diff_frames")
def combine_first(self, other: 'DataFrame') -> 'DataFrame':
    '\n        Update null elements with value in the same location in `other`.\n\n        Combine two DataFrame objects by filling null values in one DataFrame\n        with non-null values from other DataFrame. The row and column indexes\n        of the resulting DataFrame will be the union of the two.\n\n        .. versionadded:: 3.3.0\n\n        Parameters\n        ----------\n        other : DataFrame\n            Provided DataFrame to use to fill null values.\n\n        Returns\n        -------\n        DataFrame\n\n        Examples\n        --------\n        >>> ps.set_option("compute.ops_on_diff_frames", True)\n        >>> df1 = ps.DataFrame({\'A\': [None, 0], \'B\': [None, 4]})\n        >>> df2 = ps.DataFrame({\'A\': [1, 1], \'B\': [3, 3]})\n\n        >>> df1.combine_first(df2).sort_index()\n             A    B\n        0  1.0  3.0\n        1  0.0  4.0\n\n        Null values still persist if the location of that null value does not exist in other\n\n        >>> df1 = ps.DataFrame({\'A\': [None, 0], \'B\': [4, None]})\n        >>> df2 = ps.DataFrame({\'B\': [3, 3], \'C\': [1, 1]}, index=[1, 2])\n\n        >>> df1.combine_first(df2).sort_index()\n             A    B    C\n        0  NaN  4.0  NaN\n        1  0.0  3.0  1.0\n        2  NaN  3.0  1.0\n        >>> ps.reset_option("compute.ops_on_diff_frames")\n        '
    if (not isinstance(other, DataFrame)):
        raise TypeError('`combine_first` only allows `DataFrame` for parameter `other`')
    if same_anchor(self, other):
        combined = self
        this = self
        that = other
    else:
        combined = combine_frames(self, other)
        this = combined['this']
        that = combined['that']
    intersect_column_labels = set(self._internal.column_labels).intersection(set(other._internal.column_labels))
    (column_labels, data_spark_columns) = ([], [])
    for column_label in this._internal.column_labels:
        this_scol = this._internal.spark_column_for(column_label)
        if (column_label in intersect_column_labels):
            that_scol = that._internal.spark_column_for(column_label)
            this_scol_name = this._internal.spark_column_name_for(column_label)
            combined_scol = F.when(this_scol.isNull(), that_scol).otherwise(this_scol).alias(this_scol_name)
            data_spark_columns.append(combined_scol)
        else:
            data_spark_columns.append(this_scol)
        column_labels.append(column_label)
    for column_label in that._internal.column_labels:
        if (column_label not in intersect_column_labels):
            that_scol = that._internal.spark_column_for(column_label)
            data_spark_columns.append(that_scol)
            column_labels.append(column_label)
    internal = combined._internal.copy(column_labels=column_labels, data_spark_columns=data_spark_columns, data_fields=None, column_label_names=self._internal.column_label_names)
    return DataFrame(internal)