def find_le ( a , x ) : i = bs . bisect_right ( a , x ) if i : return i - 1 raise ValueError
get te left most value of a column in python
Find rightmost value less than or equal to x .
def find_le(a, x):
    """Find rightmost value less than or equal to x."""
    i = bs.bisect_right(a, x)
    if i: return i - 1
    raise ValueError