title: How to interprete the Pandas Index class documentation?
body: <p>Please help me read and use the great Pandas documentation better.</p>
  
  <p>E.g.<a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Index.contains.html" rel="nofollow noreferrer">pandas.Index.contains</a> and the <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Index.html#pandas.Index" rel="nofollow noreferrer">overview of attributes and methods for the Pandas Index class</a>.</p>
  
  <p>In this case, I want to check if a key is in the index before applying</p>
  
  <pre><code>dataframe.loc['key',['column']]) # first check if key is in index to avoid KeyError: 'the label [key] is not in the [index]'
  </code></pre>
  
  <p>I want to use the method contains(key) ("return a boolean if this key is IN the index"). </p>
  
  <p>So I incorrectly tried dataframe.Index.contains. But it should be index and not  Index. So why is it written with a capital in the documentation?</p>
  
  <p>Also, it should be with .str in between index and contains:</p>
  
  <pre><code>dataframe.index.str.contains('key')) # not dataframe.Index.contains
  </code></pre>
  
  <p>It is my fault, but how should I know this from the documentation?</p>