pandas.Series.combine_first

pandas 3.1.1 · Series and accessors · method

Fill missing positions from a second aligned object while keeping existing valid values.

Call syntax

Series.combine_first(other)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
other Required
Positional or keyword
Series

Supply the second object or value used in the operation.

Returns

Series