finishs = pd.DataFrame(data={'finish': -1}, index=A.finish.tolist())
transitions = pd.merge(starts, finishs, how='outer', left_index=True,
    right_index=True).fillna(0)
Efficiently check if value is present in any of given ranges