Series.
combine_first
Combine Series values, choosing the calling Series’s values first.
The value(s) to be combined with the Series.
The result of combining the Series with the other object.
See also
Series.combine
Perform elementwise operation on two Series using a given function.
Notes
Result index will be the union of the two indexes.
Examples
>>> s1 = ps.Series([1, np.nan]) >>> s2 = ps.Series([3, 4]) >>> with ps.option_context("compute.ops_on_diff_frames", True): ... s1.combine_first(s2) 0 1.0 1 4.0 dtype: float64