xarray.Index.concat#
- classmethod Index.concat(indexes, dim, positions=None)[source]#
Create a new index by concatenating one or more indexes of the same type.
Implementation is optional but required in order to support
concat
. Otherwise it will raise an error if the index needs to be updated during the operation.- Parameters:
indexes (sequence of
Index objects
) – Indexes objects to concatenate together. All objects must be of the same type.dim (
Hashable
) – Name of the dimension to concatenate along.positions (
None
orlist
ofinteger arrays
, optional) – List of integer arrays which specifies the integer positions to which to assign each dataset along the concatenated dimension. If not supplied, objects are concatenated in the provided order.
- Returns:
index (
Index
) – A new Index object.