title: Renaming index values in multiindex dataframe
body: <p>Creating my dataframe: </p>
  
  <pre><code>from pandas import *
  arrays = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
            ['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
  
  tuples = zip(*arrays)
  
  index = MultiIndex.from_tuples(tuples, names=['first','second'])
  data = DataFrame(randn(8,2),index=index,columns=['c1','c2'])
  
  data
  Out[68]: 
                      c1        c2
  first second                    
  bar   one     0.833816 -1.529639
        two     0.340150 -1.818052
  baz   one    -1.605051 -0.917619
        two    -0.021386 -0.222951
  foo   one     0.143949 -0.406376
        two     1.208358 -2.469746
  qux   one    -0.345265 -0.505282
        two     0.158928  1.088826
  </code></pre>
  
  <p>I would like to rename the "first" index values, such as "bar"->"cat", "baz"->"dog", etc.  However, every example I have read either operates on a single-level index and/or loops through the entire index to effectively re-create it from scratch.  I was thinking something like: </p>
  
  <pre><code>data = data.reindex(index={'bar':'cat','baz':'dog'})
  </code></pre>
  
  <p>but this does not work, nor do I really expect it to work on multiple indexes.  Can I do such a replacement without looping through the entire dataframe index?</p>
  
  <p><em><strong>Begin edit</em></strong></p>
  
  <p>I am hesitant to update to 0.13 until release, so I used the following workaround: </p>
  
  <pre><code>index = data.index.tolist()
  for r in xrange( len(index) ):
      index[r] = (codes[index[r][0]],index[r][1])
  
  index = pd.MultiIndex.from_tuples(index,names=data.index.names)
  data.index = index
  </code></pre>
  
  <p>Where  is a previous defined dictionary of code:string pairs.  This actually isn't as big of a performance his as I was expecting (takes a couple seconds to operate over ~1.1 million rows).  It is not as pretty as a one-liner, but it does work. </p>
  
  <p><em><strong>End Edit</em></strong></p>