title: How to quickly check if a value exists in pandas DataFrame index?
body: <p>When I update the <code>dataframe</code>, I should check if the value exists in the <code>dataframe</code> index, but I want to know <strong>which way is faster</strong>, thanks!</p>
  
  <p><code>
  1. if value in set(dataframe.index)
  2. if value in dataframe.index
  </code></p>