modin.pandas.Index.union¶
- Index.union(other: Any, sort: bool = False) Index[source]¶
Form the union of two Index objects.
If the Index objects are incompatible, both Index objects will be cast to dtype(‘object’) first.
- Parameters:
other (Index or array-like) –
sort (bool or None, default None) –
Whether to sort the resulting Index.
None : Sort the result, except when
self and other are equal.
self or other has length 0.
Some values in self or other cannot be compared. A RuntimeWarning is issued in this case.
False : do not sort the result.
True : Sort the result (which may raise TypeError).
- Returns:
The Index that represents the union between the two indexes
- Return type:
Examples
Union matching dtypes
Union mismatched dtypes