I have a dataframe looks like:
date   accumulated_visits
01-01    102
01-02    134
01-03    148
01-04    159
01-05    162
01-06    175
I want a function, which could find the nearest entry, given a specific visit number. For example, I want to find the date when accumulated visits reaches closing to 150. I expect return
01-03  148 
Is there a buildin function to handle that?