更新时间:2022-12-13 14:57:56
Well, the docs on aggregate are in fact a bit lacking. There might be a way to handle this with the correct passing of arguments, and you could look into the source code of pandas for that (perhaps I will later).
但是,您可以轻松做到:
However, you could easily do:
df.groupby('A').agg([np.mean, lambda x: np.std(x, ddof=0)])
它也将正常工作.