how to improve searching index in dataframe
This probably doesn't take into account that dates are sorted and thus performs as O(n). Try using binary-search on dates, that would perform as O(log(n)) (avoid implementing your own, look for a standard module, maybe it exists in numpy).