0

I am getting error while trying to find high correlation

corr=temp.corr()
corr_high=abs(corr)>0.6 #8

Input

for i in corr_high.columns:
    for j in corr_high.columns:
        if (corr_high[i][j]==True)&(i!=j):
            if j not in remove:
                remove.append(i)

Output

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Any help would be appreciated.

SUMIT
  • 563
  • 4
  • 12
  • the code you shared doesn't result in the error you shared, given that `temp` is a usual pd.DataFrame, which you didn't share. – Mustafa Aydın Apr 02 '23 at 18:45

0 Answers0