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