'Return the index of the largest key in data greater than or
equal to the given key, data pair.
Parameters
key : tuple
Column key
data : int
Row number
exact : bool
If True, return the index of the given key in data
or -1 if the key is not present.'

def find_pos(self, key, data, exact=False):

    begin = 0
    end = len(self.row_index)
    num_cols = self.num_cols
    if (not self.unique):
        key = (key + (data,))
        num_cols += 1
    for i in range(num_cols):
        key_slice = self._get_key_slice(i, begin, end)
        t = _searchsorted(key_slice, key[i])
        if (exact and ((t == len(key_slice)) or (key_slice[t] != key[i]))):
            return (-1)
        elif ((t == len(key_slice)) or ((t == 0) and (len(key_slice) > 0) and (key[i] < key_slice[0]))):
            return (begin + t)
        end = (begin + _searchsorted(key_slice, key[i], side=u'right'))
        begin += t
        if (begin >= len(self.row_index)):
            return begin
    return begin
