Pandas > Calculate covariance

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,100,size=(5, 3)), columns=['C1','C2','C3'])
print ("dataframe")
print (dataframe)
print ("dataframe covariance")
print (dataframe.cov())
dataframe
   C1  C2  C3
0  59  45  78
1  24  43  84
2  65  68  56
3  72  21  54
4   4  14  44
dataframe covariance
        C1      C2     C3
C1  861.70  279.55   41.3
C2  279.55  459.70  152.2
C3   41.30  152.20  289.2