hipdf.Index.join#
21 min read time
Applies to Linux
- Index.join(other, how='left', level=None, return_indexers=False, sort=False)#
Compute join_index and indexers to conform data structures to the new index.
Parameters#
other : Index. how : {‘left’, ‘right’, ‘inner’, ‘outer’} return_indexers : bool, default False 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: index
Examples#
>>> import cudf >>> lhs = cudf.DataFrame({ ... "a": [2, 3, 1], ... "b": [3, 4, 2], ... }).set_index(['a', 'b']).index >>> lhs MultiIndex([(2, 3), (3, 4), (1, 2)], names=['a', 'b']) >>> rhs = cudf.DataFrame({"a": [1, 4, 3]}).set_index('a').index >>> rhs Int64Index([1, 4, 3], dtype='int64', name='a') >>> lhs.join(rhs, how='inner') MultiIndex([(3, 4), (1, 2)], names=['a', 'b'])