用法:
Index.isin(values)
返回一個布爾數組,其中索引值在 values 中。
計算是否在傳遞的值集中找到每個索引值的布爾數組。返回的布爾數組的長度與索引的長度相匹配。
- values:設置,list-like,索引
尋求的值。
- is_contained:杯形陣列
布爾值的 CuPy 數組。
參數:
返回:
例子:
>>> idx = cudf.Index([1,2,3]) >>> idx Int64Index([1, 2, 3], dtype='int64')
檢查每個索引值是否在值列表中。
>>> idx.isin([1, 4]) array([ True, False, False])
相關用法
- Python cudf.Index.is_boolean用法及代碼示例
- Python cudf.Index.is_numeric用法及代碼示例
- Python cudf.Index.is_integer用法及代碼示例
- Python cudf.Index.is_object用法及代碼示例
- Python cudf.Index.is_categorical用法及代碼示例
- Python cudf.Index.is_interval用法及代碼示例
- Python cudf.Index.is_floating用法及代碼示例
- Python cudf.Index.intersection用法及代碼示例
- Python cudf.Index.astype用法及代碼示例
- Python cudf.Index.set_names用法及代碼示例
- Python cudf.Index.sort_values用法及代碼示例
- Python cudf.Index.union用法及代碼示例
- Python cudf.Index.join用法及代碼示例
- Python cudf.Index.get_level_values用法及代碼示例
- Python cudf.Index.rename用法及代碼示例
- Python cudf.Index.to_pandas用法及代碼示例
- Python cudf.Index.difference用法及代碼示例
- Python cudf.Index.from_pandas用法及代碼示例
- Python cudf.Index.append用法及代碼示例
- Python cudf.Index.fillna用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.Index.isin。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。