We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
The function DataFrame.agg allows for kwargs to aggregate and rename the results.
DataFrame.agg
df = pd.DataFrame({'a': [1, 2, 3]}) print(df.agg(a_new=('a', 'sum')))
results in
a a_new 6
Perhaps I'm missing it, but I can't find it in both the API reference and the User Guide.