hipdf.Index.take

Contents

hipdf.Index.take#

20 min read time

Applies to Linux

Index.take(indices, axis=0, allow_fill=True, fill_value=None)#

Return a new index containing the rows specified by indices

Parameters#

indicesarray-like

Array of ints indicating which positions to take.

axisint

The axis over which to select values, always 0.

allow_fill : Unsupported fill_value : Unsupported

Returns#

outIndex

New object with desired subset of rows.

Examples#

>>> idx = cudf.Index(['a', 'b', 'c', 'd', 'e'])
>>> idx.take([2, 0, 4, 3])
StringIndex(['c' 'a' 'e' 'd'], dtype='object')