I can\'t figure out the difference between Pandas .aggregate and .apply functions.
Take the following as an example: I load a dataset, do a
When using apply to a groupby I have encountered that .apply will return the grouped columns. There is a note in the documentation (pandas.pydata.org/pandas-docs/stable/groupby.html):
"...Thus the grouped columns(s) may be included in the output as well as set the indices."
.aggregate will not return the grouped columns.