We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
I didn't realize this was possible, and didn't see it in the docs.
df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'a', 'b'], 'C': [3, 4, 5]}) df.groupby('B').agg({'A': {'mean1': 'mean', 'med1': 'median'}, 'C': {'mean2': 'mean', 'med2': 'median'}})