Closed
Description
Code Sample, a copy-pastable example if possible
>>> df = pd.DataFrame({'key' : ['a', 'a', 'b', 'b', 'a'],
'data' : np.random.randn(5)})
>>> df.groupby('key')['data'].agg([('foo', 'mean')])
foo
key
a -0.944872
b 0.893212
Problem description
I know its deprecated to rename columns with a dictionary of dictionaries in a groupby but a list of tuples also renames columns.
This behavior is not found in the docs. I accidentally discovered this a while back and then saw it again in Python for Data Analysis.