當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python cudf.Index.append用法及代碼示例

用法:

Index.append(other)

將一組索引選項附加在一起。

參數

other索引或索引列表/元組

返回

appended index

例子

>>> import cudf
>>> idx = cudf.Index([1, 2, 10, 100])
>>> idx
Int64Index([1, 2, 10, 100], dtype='int64')
>>> other = cudf.Index([200, 400, 50])
>>> other
Int64Index([200, 400, 50], dtype='int64')
>>> idx.append(other)
Int64Index([1, 2, 10, 100, 200, 400, 50], dtype='int64')

append 接受 Index 對象列表

>>> idx.append([other, other])
Int64Index([1, 2, 10, 100, 200, 400, 50, 200, 400, 50], dtype='int64')

相關用法


注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.Index.append。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。