title: Map dataframe index using dictionary
body: <p>Why doesn't <code>df.index.map(dict)</code> work like <code>df['column_name'].map(dict)</code>?</p>
  
  <p>Here's a little example of trying to use index.map:</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({'one': {'A': 10, 'B': 20, 'C': 30, 'D': 40, 'E': 50}})
  map_dict = {'A': 'every', 'B': 'good', 'C': 'boy', 'D': 'does', 'E': 'fine'}
  df
  '''
      one
  A   10
  B   20
  C   30
  D   40
  E   50
  '''
  
  df['two'] = df.index.map(mapper=map_dict)
  </code></pre>
  
  <p>This raises <code>TypeError: 'dict' object is not callable</code></p>
  
  <p>Feeding it a lambda works:</p>
  
  <pre><code>df['two'] = df.index.map(mapper=(lambda x: map_dict[x])); df
  '''
     one    two
  A   10  every
  B   20   good
  C   30    boy
  D   40   does
  E   50   fine
  '''
  </code></pre>
  
  <p>However, resetting the index and mapping on a column works as expected without complaint:</p>
  
  <pre><code>df.reset_index(inplace=True)
  df.rename(columns={'index': 'old_ndx'}, inplace=True) #so there's no index name confusion
  df['two'] = df.old_ndx.map(map_dict); df
  
  '''
    old_ndx  one    two
  0       A   10  every
  1       B   20   good
  2       C   30    boy
  3       D   40   does
  4       E   50   fine
  '''
  </code></pre>