title: Change Index Type in Pandas
body: <p>I am using Pandas in Python 3,</p>
  
  <p>I have a dataframe whose index is like '20160727', but the datatype is 'object'.</p>
  
  <p>I am trying to convert it into string type.</p>
  
  <p>I tried:</p>
  
  <pre><code>data.index.astye(str, copy=False)
  </code></pre>
  
  <p>and <code>data.index = data.index.map(str)</code></p>
  
  <p>But even after these two operations,</p>
  
  <p>I get:</p>
  
  <pre><code>data.index.dtype is dtype('O')
  </code></pre>
  
  <p>I want to use sort after converting the index to string. How can I convert the index to string datatype so that I can process it like a string?</p>