Why is df.corr() giving “ValueError: could not convert string to float” ?
This issue could be due to an outdated version of Seaborn. You can resolve it by updating Seaborn with the following command: pip install seaborn --upgrade
This issue could be due to an outdated version of Seaborn. You can resolve it by updating Seaborn with the following command:
pip install seaborn --upgrade
To get rid of this error use: numeric_only=True df.corr(numeric_only=True) This is ignoring the columns that are 'object' type while calculating correlation.
To get rid of this error use: numeric_only=True
This is ignoring the columns that are ‘object’ type while calculating correlation.
See less