hipdf.Index.searchsorted

hipdf.Index.searchsorted#

21 min read time

Applies to Linux

Index.searchsorted(value, side: str = 'left', ascending: bool = True, na_position: str = 'last')#

Find index where elements should be inserted to maintain order

Parameters#

value :

Value to be hypothetically inserted into Self

sidestr {‘left’, ‘right’} optional, default ‘left’

If ‘left’, the index of the first suitable location found is given If ‘right’, return the last such index

ascendingbool optional, default True

Index is in ascending order (otherwise descending)

na_positionstr {‘last’, ‘first’} optional, default ‘last’

Position of null values in sorted order

Returns#

Insertion point.

Notes#

As a precondition the index must be sorted in the same order as requested by the ascending flag.