task 10

 avatar
unknown
python
3 years ago
370 B
3
Indexable
def test():
    mx = df.min().min()
    for i in df.columns:
        for j in df.columns:
            if i!=j:
                corr = df[i].corr(df[j])
                if(corr > mx):
                   mx1 = i
                   mx2 = j
                   mx = corr
    print("The Highest Positive Correlation = ", mx)
    print("It's between ",mx1,"and",mx2)
Editor is loading...