@@ -2308,6 +2308,11 @@ def combine(self, other, func, fill_value=None):
2308
2308
Series
2309
2309
The result of combining the Series with the other object.
2310
2310
2311
+ See Also
2312
+ --------
2313
+ Series.combine_first : Combine Series values, choosing the calling
2314
+ Series' values first.
2315
+
2311
2316
Examples
2312
2317
--------
2313
2318
>>> s1 = pd.Series([1, 2])
@@ -2331,11 +2336,6 @@ def combine(self, other, func, fill_value=None):
2331
2336
2 787
2332
2337
dtype: int64
2333
2338
2334
- See Also
2335
- --------
2336
- Series.combine_first : Combine Series values, choosing the calling
2337
- Series' values first.
2338
-
2339
2339
"""
2340
2340
if fill_value is None :
2341
2341
fill_value = na_value_for_dtype (self .dtype , compat = False )
@@ -2387,16 +2387,7 @@ def combine_first(self, other):
2387
2387
Returns
2388
2388
-------
2389
2389
combined : Series
2390
-
2391
- Examples
2392
- --------
2393
- >>> s1 = pd.Series([1, np.nan])
2394
- >>> s2 = pd.Series([3, 4])
2395
- >>> s1.combine_first(s2)
2396
- 0 1.0
2397
- 1 4.0
2398
- dtype: float64
2399
-
2390
+
2400
2391
See Also
2401
2392
--------
2402
2393
Series.combine : Perform elementwise operation on two Series
@@ -2406,6 +2397,15 @@ def combine_first(self, other):
2406
2397
-----
2407
2398
Result index will be the union of the two indexes.
2408
2399
2400
+ Examples
2401
+ --------
2402
+ >>> s1 = pd.Series([1, np.nan])
2403
+ >>> s2 = pd.Series([3, 4])
2404
+ >>> s1.combine_first(s2)
2405
+ 0 1.0
2406
+ 1 4.0
2407
+ dtype: float64
2408
+
2409
2409
"""
2410
2410
new_index = self .index .union (other .index )
2411
2411
this = self .reindex (new_index , copy = False )
0 commit comments