Series.combine_first(self, other)
[source]
Combine Series values, choosing the calling Series’s values first.
Parameters: |
|
---|---|
Returns: |
|
See also
Series.combine
Result index will be the union of the two indexes.
>>> s1 = pd.Series([1, np.nan]) >>> s2 = pd.Series([3, 4]) >>> s1.combine_first(s2) 0 1.0 1 4.0 dtype: float64
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Series.combine_first.html