title: Select a DataFrame date index as a string
body: <p>I am fetching historical commodity prices using an API, which has a 10k row limit each call. The Python package for that API has startDate and endDate parameters. The data is fed starting from the endDate. The index in a resulting df is the date.</p>
  <p>Instead of looking at where the API stopped sending data manually, I thought of deleting the last date, where only certain commodities were able to appear, and use that date as the endDate, making it the starting point for the next batch.</p>
  <p>There's probably a better way of achieving what I want, but my question for now is how do I get the index of a df as a string?</p>
  <p>Example output:</p>
  <pre><code>df = fetchData(initDate='1975-01-01', output_type='df')
  </code></pre>
  <pre><code>            symbol  open      high       low        close
  2021-08-09  AU      4.16      4.18       4.04       4.05
  2021-08-09  CU      34685     34685      34685      34685
  2021-08-09  PT      67.88     67.90      65.15      65.93
  ...
  2018-05-16  AL      3.16      3.18       3.04       3.05
  2018-05-16  CO      5         5.1        4.9        5.3
  2018-05-15  AU      3.88      3.90       3.15       3.93
   
  </code></pre>
  <p>In this case, I want to get '2018-05-15', delete the lines with that date, put it into a variable and add it to the endDate parameter like such:</p>
  <pre><code>df = fetchData( initDate='1975-01-01', endDate='2018-08-15', output_type='df')
  </code></pre>
  <p>The closest I've gotten is with this:</p>
  <pre><code>df.iloc[-1,0]
  </code></pre>
  <p>Which as expected outputs the symbol AU. How to I get it to output the index?</p>
  <p>Alternatively, would there be a better way to 'append' the data in every call without creating duplicates?</p>