title: Access index in pandas.Series.apply
body: <p>Lets say I have a MultiIndex Series <code>s</code>:</p>
  
  <pre><code>&gt;&gt;&gt; s
       values
  a b
  1 2  0.1 
  3 6  0.3
  4 4  0.7
  </code></pre>
  
  <p>and I want to apply a function which uses the index of the row:</p>
  
  <pre><code>def f(x):
     # conditions or computations using the indexes
     if x.index[0] and ...: 
     other = sum(x.index) + ...
     return something
  </code></pre>
  
  <p>How can I do <code>s.apply(f)</code> for such a function? What is the recommended way to make this kind of operations? I expect to obtain a new Series with the values resulting from this function applied on each row and the same MultiIndex.</p>