# pandas 3.1.0 (BSD-3-Clause), harvested by tools/harvest_corpus.py
=== input

        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
            The other index on which join is performed.
        how : {'left', 'right', 'inner', 'outer'}
        level : int or level name, default None
            It is either the integer position or the name of the level.
        return_indexers : bool, default False
            Whether to return the indexers or not for both the index objects.
        sort : bool, default 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
        --------
        >>> 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]))
        
=== parse numpydoc
short_description: 'Compute join_index and indexers to conform data structures to the new index.'
long_description: |
  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.
blank_after_short_description: True
blank_after_long_description: True
style: numpydoc
- DocstringParam
  description: 'The other index on which join is performed.'
  kind: param
  key: 'param'
  arg_name: 'other'
  type_name: 'Index'
  is_optional: False
- DocstringParam
  kind: param
  key: 'param'
  arg_name: 'how'
  type_name: "{'left', 'right', 'inner', 'outer'}"
  is_optional: False
- DocstringParam
  description: 'It is either the integer position or the name of the level.'
  kind: param
  key: 'param'
  arg_name: 'level'
  type_name: 'int or level name'
  is_optional: True
  default: 'None'
  raw_type_name: 'int or level name, default None'
- DocstringParam
  description: 'Whether to return the indexers or not for both the index objects.'
  kind: param
  key: 'param'
  arg_name: 'return_indexers'
  type_name: 'bool'
  is_optional: True
  default: 'False'
  raw_type_name: 'bool, default False'
- DocstringParam
  description: |
    Sort the join keys lexicographically in the result Index. If False,
    the order of the join keys depends on the join type (how keyword).
  kind: param
  key: 'param'
  arg_name: 'sort'
  type_name: 'bool'
  is_optional: True
  default: 'False'
  raw_type_name: 'bool, default False'
- DocstringReturns
  description: 'The new index.'
  kind: returns
  key: 'returns'
  type_name: 'join_index, (left_indexer, right_indexer)'
  is_generator: False
- DocstringMeta
  description: |
    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.
  kind: text
  key: 'see_also'
  title: 'See Also'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> idx1 = pd.Index([1, 2, 3])'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: '>>> idx2 = pd.Index([4, 5, 6])'
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> idx1.join(idx2, how="outer")
    Index([1, 2, 3, 4, 5, 6], dtype='int64')
- DocstringExample
  kind: examples
  key: 'examples'
  snippet: |
    >>> 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]))
=== detect
numpydoc
=== compose numpydoc
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
    The other index on which join is performed.
how : {'left', 'right', 'inner', 'outer'}
level : int or level name, default None
    It is either the integer position or the name of the level.
return_indexers : bool, default False
    Whether to return the indexers or not for both the index objects.
sort : bool, default 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
--------
>>> 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]))
