title: How to return the index value of an element in a pandas dataframe
body: <p>I have a dataframe of corporate actions for a specific equity. it looks something like this:</p>
  
  <pre><code>0             Declared Date       Ex-Date    Record Date
  BAR_DATE                 
  2018-01-17       2017-02-21    2017-08-09     2017-08-11
  2018-01-16       2017-02-21    2017-05-10     2017-06-05
  </code></pre>
  
  <p>except that it has hundreds of rows, but that is unimportant. I created the index "BAR_DATE" from one of the columns which is where the 0 comes from above BAR_DATE.</p>
  
  <p>What I want to do is to be able to reference a specific element of the dataframe and return the index value, or BAR_DATE, I think it would go something like this:</p>
  
  <pre><code>index_value = cacs.iloc[5, :].index.get_values()
  </code></pre>
  
  <p>except index_value becomes the column names, not the index. Now, this may stem from a poor understanding of indexing in pandas dataframes, so this may or may not be really easy to solve for someone else. </p>
  
  <p>I have looked at a number of other questions including <a href="https://stackoverflow.com/questions/16683701/in-pandas-how-to-get-the-index-of-a-known-value">this one</a>, but it returns column values as well.</p>