Pandas > Apply aggregate functions

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,10,size=(5, 3)), columns=['C1','C2','C3'])
print ("dataframe")
print (dataframe)
print ("aggregates")
aggregates = dataframe.agg(['sum', 'max','mean'])
print (aggregates)
dataframe
   C1  C2  C3
0   4   3   0
1   5   0   9
2   8   9   2
3   6   7   5
4   5   9   2
aggregates
        C1    C2    C3
sum   28.0  28.0  18.0
max    8.0   9.0   9.0
mean   5.6   5.6   3.6