@@ -2289,6 +2289,11 @@ def combine(self, other, func, fill_value=None):
2289
2289
Series
2290
2290
The result of combining the Series with the other object.
2291
2291
2292
+ See Also
2293
+ --------
2294
+ Series.combine_first : Combine Series values, choosing the calling
2295
+ Series' values first.
2296
+
2292
2297
Examples
2293
2298
--------
2294
2299
>>> s1 = pd.Series([1, 2])
@@ -2312,11 +2317,6 @@ def combine(self, other, func, fill_value=None):
2312
2317
2 787
2313
2318
dtype: int64
2314
2319
2315
- See Also
2316
- --------
2317
- Series.combine_first : Combine Series values, choosing the calling
2318
- Series' values first.
2319
-
2320
2320
"""
2321
2321
if fill_value is None :
2322
2322
fill_value = na_value_for_dtype (self .dtype , compat = False )
@@ -2364,16 +2364,7 @@ def combine_first(self, other):
2364
2364
Returns
2365
2365
-------
2366
2366
combined : Series
2367
-
2368
- Examples
2369
- --------
2370
- >>> s1 = pd.Series([1, np.nan])
2371
- >>> s2 = pd.Series([3, 4])
2372
- >>> s1.combine_first(s2)
2373
- 0 1.0
2374
- 1 4.0
2375
- dtype: float64
2376
-
2367
+
2377
2368
See Also
2378
2369
--------
2379
2370
Series.combine : Perform elementwise operation on two Series
@@ -2383,6 +2374,15 @@ def combine_first(self, other):
2383
2374
-----
2384
2375
Result index will be the union of the two indexes.
2385
2376
2377
+ Examples
2378
+ --------
2379
+ >>> s1 = pd.Series([1, np.nan])
2380
+ >>> s2 = pd.Series([3, 4])
2381
+ >>> s1.combine_first(s2)
2382
+ 0 1.0
2383
+ 1 4.0
2384
+ dtype: float64
2385
+
2386
2386
"""
2387
2387
new_index = self .index .union (other .index )
2388
2388
this = self .reindex (new_index , copy = False )
0 commit comments