larray.Axis.union

Axis.union(other) Axis[source]

Return axis with the union of this axis labels and other labels.

Labels relative order will be kept intact, but only unique labels will be returned. Labels from this axis will be before labels from other.

Parameters
otherAxis, Group or any sequence of labels

other labels

Returns
Axis

Examples

>>> a = Axis('a=a0..a2')
>>> a.union('a1')
Axis(['a0', 'a1', 'a2'], 'a')
>>> a.union('a3')
Axis(['a0', 'a1', 'a2', 'a3'], 'a')
>>> a.union(Axis('a=a1..a3'))
Axis(['a0', 'a1', 'a2', 'a3'], 'a')
>>> a.union('a1..a3')
Axis(['a0', 'a1', 'a2', 'a3'], 'a')
>>> a.union(['a1', 'a2', 'a3'])
Axis(['a0', 'a1', 'a2', 'a3'], 'a')