pandas.Index.join
pandas 3.1.1 · Index objects · method
Combine labels using a join rule and optionally return indexers for the original indexes.
Call syntax
Index.join(other, *, how='left', level=None, return_indexers=False, sort=False)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
other |
Required Positional or keyword |
Index Supply the second object or value used in the operation. |
how |
Optional Keyword only Default 'left' |
{'left', 'right', 'inner', 'outer'} Choose a policy such as a join type or a missing-value removal rule. |
level |
Optional Keyword only Default None |
int or level name Choose an index level by name or integer position. |
return_indexers |
Optional Keyword only Default False |
bool |
sort |
Optional Keyword only Default False |
bool Choose whether the resulting labels or groups are sorted where supported. |
Returns
join_index, (left_indexer, right_indexer)