@@ -2872,6 +2872,8 @@ def union(self, other, sort=None):
2872
2872
Parameters
2873
2873
----------
2874
2874
other : Index or array-like
2875
+ Index or an array-like object containing elements to form the union
2876
+ with the original Index.
2875
2877
sort : bool or None, default None
2876
2878
Whether to sort the resulting Index.
2877
2879
@@ -2888,6 +2890,14 @@ def union(self, other, sort=None):
2888
2890
Returns
2889
2891
-------
2890
2892
Index
2893
+ Returns a new Index object with all unique elements from both the original
2894
+ Index and the `other` Index.
2895
+
2896
+ See Also
2897
+ --------
2898
+ Index.unique : Return unique values in the index.
2899
+ Index.intersection : Form the intersection of two Index objects.
2900
+ Index.difference : Return a new Index with elements of index not in `other`.
2891
2901
2892
2902
Examples
2893
2903
--------
@@ -3312,7 +3322,10 @@ def symmetric_difference(self, other, result_name=None, sort=None):
3312
3322
Parameters
3313
3323
----------
3314
3324
other : Index or array-like
3325
+ Index or an array-like object with elements to compute the symmetric
3326
+ difference with the original Index.
3315
3327
result_name : str
3328
+ A string representing the name of the resulting Index, if desired.
3316
3329
sort : bool or None, default None
3317
3330
Whether to sort the resulting index. By default, the
3318
3331
values are attempted to be sorted, but any TypeError from
@@ -3326,6 +3339,14 @@ def symmetric_difference(self, other, result_name=None, sort=None):
3326
3339
Returns
3327
3340
-------
3328
3341
Index
3342
+ Returns a new Index object containing elements that appear in either the
3343
+ original Index or the `other` Index, but not both.
3344
+
3345
+ See Also
3346
+ --------
3347
+ Index.difference : Return a new Index with elements of index not in other.
3348
+ Index.union : Form the union of two Index objects.
3349
+ Index.intersection : Form the intersection of two Index objects.
3329
3350
3330
3351
Notes
3331
3352
-----
0 commit comments