I\'ve frequented used pandas\' agg() function to run summary statistics on every column of a data.frame. For example, here\'s how you would produce the mean an
agg()
Even easier:
import pandas as pd pd.pivot_table(df,index='A',aggfunc=(np.mean))
output:
B C A group1 11.0 101 group2 17.5 175 group3 11.0 101