title: Apply Function on DataFrame Index
body: <p>What is the best way to apply a function over the index of a Pandas <code>DataFrame</code>?
  Currently I am using this verbose approach:</p>
  
  <pre><code>pd.DataFrame({"Month": df.reset_index().Date.apply(foo)})
  </code></pre>
  
  <p>where <code>Date</code> is the name of the index and <code>foo</code> is the name of the function that I am applying.</p>