dico = pd.DataFrame({'<=4': [0, 4], '(4,10]': [4, 10], '>10': [10, float(
    'inf')]}).transpose()
foo = lambda x: dico.index[(dico[1] > x) & (dico[0] <= x)][0]
Pandas DataFrame: Writing values to column depending on a value check of existing column