用法:
Index.join(other, how='left', level=None, return_indexers=False, sort=False)
計算join_index 和索引器以使數據結構符合新索引。
- other: index 。
- how:{‘left’, ‘right’, ‘inner’, ‘outer’}
- return_indexers:布爾值,默認為 False
- sort:布爾值,默認為 False
在結果索引中按字典順序對連接鍵進行排序。如果為 False,則連接鍵的順序取決於連接類型(how 關鍵字)。
- Returns: index:
參數:
例子:
>>> 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'])
相關用法
- Python cudf.Index.is_boolean用法及代碼示例
- Python cudf.Index.astype用法及代碼示例
- Python cudf.Index.set_names用法及代碼示例
- Python cudf.Index.is_numeric用法及代碼示例
- Python cudf.Index.sort_values用法及代碼示例
- Python cudf.Index.union用法及代碼示例
- Python cudf.Index.is_integer用法及代碼示例
- Python cudf.Index.get_level_values用法及代碼示例
- Python cudf.Index.isin用法及代碼示例
- Python cudf.Index.rename用法及代碼示例
- Python cudf.Index.to_pandas用法及代碼示例
- Python cudf.Index.difference用法及代碼示例
- Python cudf.Index.is_object用法及代碼示例
- Python cudf.Index.from_pandas用法及代碼示例
- Python cudf.Index.is_categorical用法及代碼示例
- Python cudf.Index.append用法及代碼示例
- Python cudf.Index.is_interval用法及代碼示例
- Python cudf.Index.intersection用法及代碼示例
- Python cudf.Index.is_floating用法及代碼示例
- Python cudf.Index.fillna用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.Index.join。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。