.corr () Python

# 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()
wolf-like_hunter