cudf.Index.searchsorted#
- Index.searchsorted(value, side: Literal['left', 'right'] = 'left', ascending: bool = True, na_position: Literal['first', 'last'] = '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.