title: How do you rename all columns in multi level group by in pandas 0.20.1+
body: <p>With the release of Pandas 0.20.1, there is a new deprecation of the functionality to groupby.agg() with a dictionary for renaming.</p>
  
  <p><a href="http://pandas.pydata.org/pandas-docs/stable/whatsnew.html#deprecate-groupby-agg-with-a-dictionary-when-renaming" rel="noreferrer">Deprecation documentation</a></p>
  
  <p>I'm trying to find best way to update my code to account for this, however I'm struggling with how I've currently been utilizing this rename functionality.</p>
  
  <p>When I am doing an aggregate, I often have multiple functions for each source column, and I have been using this rename functionality to get to a single level index with these new column names.</p>
  
  <p>Example:</p>
  
  <pre><code>df = pd.DataFrame({'A': [1, 1, 1, 2, 2],'B': range(5),'C': range(5)})
  
  In [30]: df
  Out[30]: 
     A  B  C
  0  1  0  0
  1  1  1  1
  2  1  2  2
  3  2  3  3
  4  2  4  4
  
  frame = df.groupby('A').agg({'B' : {'foo':'sum'}, 'C': {'bar' : 'min', 'bar2': 'max'}})
  </code></pre>
  
  <p>Which results in:</p>
  
  <pre><code>Out[33]: 
      B   C     
    foo bar bar2
  A             
  1   3   0    2
  2   7   3    4
  </code></pre>
  
  <p>Which I then typically do:</p>
  
  <pre><code>frame = pd.DataFrame(frame).reset_index(col_level=1)
  
  frame.columns = frame.columns.get_level_values(1)
  
  frame
  Out[42]: 
     A  foo  bar  bar2
  0  1    3    0     2
  1  2    7    3     4
  </code></pre>
  
  <p>So I'm looking for good ways to get a result dataframe that is single level index, but has new unique column names. Where multiple columns originated from an aggregate from a single source column.  Any recommendations of best approach is greatly appreciated. </p>