I am sure there is an obvious way to do this but cant think of anything slick right now.
Basically instead of raising exception I would like to get True
True
df = pandas.DataFrame({'g':[1]}, index=['isStop']) #df.loc['g'] if 'g' in df.index: print("find g") if 'isStop' in df.index: print("find a")