# Method of a pandas dataframe object.
# It calculates the correlation matrix among the columns of the dataframe:
# 'method' argument allows you to choose the method for correlation calculation
# method can be ‘pearson’, ‘kendall’, ‘spearman’.
import pandas as pd
# ... define df, your pandas dataframe, either from scratch or from a file
corr_matrix = df.corr()
df = pd.DataFrame({'age':[10, 15, 20], 'weight':[20, 45, 60]})
print(df.corr())
#output
# age weight
#age 1.000000 0.989743
#weight 0.989743 1.000000