Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

.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()
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
9+1 =