ml-python icon indicating copy to clipboard operation
ml-python copied to clipboard

solving problem of Corr().

Open dipraj-howlader opened this issue 11 months ago • 0 comments

Corr() doesn't support "Species", for this we need to temp remove the column.

Dataframe contains a feature "Species" which prevent Corr() to make its operation. for this,

#new code

numeric_iris = iris.drop(columns=['species']) correlation = numeric_iris.corr()

sns.heatmap(numeric_iris.corr(),cmap='coolwarm', annot = True)

run this code to success your operation..

dipraj-howlader avatar Feb 10 '25 19:02 dipraj-howlader