# xarray.CFTimeIndex.join

#### CFTimeIndex.join(other, , how='left', level=None, return_indexers=False, sort=False)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.14/site-packages/pandas/core/indexes/base.py#L4380-L4505)

Compute join_index and indexers to conform data structures to the new index.

* **Parameters:**
  * **other** ([`Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index)) – The other index on which join is performed.
  * **how** (`{'left', 'right', 'inner', 'outer'}`)
  * **level** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or `level name`, *default* [`None`](https://docs.python.org/3/builtins/constants.html#None)) – It is either the integer position or the name of the level.
  * **return_indexers** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default* [`False`](https://docs.python.org/3/builtins/constants.html#False)) – Whether to return the indexers or not for both the index objects.
  * **sort** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default* [`False`](https://docs.python.org/3/builtins/constants.html#False)) – Sort the join keys lexicographically in the result Index. If False,
    the order of the join keys depends on the join type (how keyword).
* **Returns:**
  `join_index`, `(left_indexer`, `right_indexer)` – The new index.

#### SEE ALSO
`DataFrame.join`
: Join columns with other DataFrame either on index or on a key.

`DataFrame.merge`
: Merge DataFrame or named Series objects with a database-style join.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('e7ed45fc-3cdb-484e-8d7c-f2b215c35c2c','93ea1cf3-6da1-4e6d-bc25-2e9a7843335a','7308b86b-9308-43aa-9c13-b1b37c989928','../lite/tree/../notebooks/index.html?path=3a508efa_f951_4d34_a891_a3792a829634.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx1 = pd.Index([1, 2, 3])
>>> idx2 = pd.Index([4, 5, 6])
>>> idx1.join(idx2, how="outer")
Index([1, 2, 3, 4, 5, 6], dtype='int64')
>>> idx1.join(other=idx2, how="outer", return_indexers=True)
(Index([1, 2, 3, 4, 5, 6], dtype='int64'),
array([ 0,  1,  2, -1, -1, -1]), array([-1, -1, -1,  0,  1,  2]))
```

<div id="7308b86b-9308-43aa-9c13-b1b37c989928" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('e7ed45fc-3cdb-484e-8d7c-f2b215c35c2c','7308b86b-9308-43aa-9c13-b1b37c989928')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('e7ed45fc-3cdb-484e-8d7c-f2b215c35c2c','7308b86b-9308-43aa-9c13-b1b37c989928')">Open In Tab</button></div><div id="93ea1cf3-6da1-4e6d-bc25-2e9a7843335a" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
