title: Check if a value exists in pandas dataframe index
body: <p>I am sure there is an obvious way to do this but cant think of anything slick right now.</p>
  
  <p>Basically instead of raising exception I would like to get <code>True</code> or <code>False</code> to see if a value exists in pandas <code>df</code> index.</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame({'test':[1,2,3,4]}, index=['a','b','c','d'])
  df.loc['g']  # (should give False)
  </code></pre>
  
  <p>What I have working now is the following</p>
  
  <pre><code>sum(df.index == 'g')
  </code></pre>