# 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.15/site-packages/pandas/core/indexes/base.py#L4579-L4732)

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

This method computes the result of a join between two Index objects
using the specified join type, and optionally returns integer indexers
that map each original index to the new joined 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('1b983483-c3c7-45ab-a5c0-821d847682f6','607cb55d-2a7c-4423-be5f-d126dd5fc764','a1a8d08a-c7ff-4d6e-a957-a9ff1e56688e','../lite/tree/../notebooks/index.html?path=4d4e06d7_6ae1_452d_b603_4c1ed4a9892b.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="a1a8d08a-c7ff-4d6e-a957-a9ff1e56688e" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('1b983483-c3c7-45ab-a5c0-821d847682f6','a1a8d08a-c7ff-4d6e-a957-a9ff1e56688e')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('1b983483-c3c7-45ab-a5c0-821d847682f6','a1a8d08a-c7ff-4d6e-a957-a9ff1e56688e')">Open In Tab</button></div><div id="607cb55d-2a7c-4423-be5f-d126dd5fc764" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
