when I am trying to run sns.heatmap(df.corr(),annot=True) this code in my jupyter notebook. this error is occuring. I cannot understand this problem. please help me.
corr() is giving an error. please help out of this problem and tell me what is this error about
For df.corr() you would have to pass float/integer instead of string. You can check this answer on stack overflow as well - https://stackoverflow.com/questions/51241575/calculate-correlation-between-columns-of-strings.
To convert the strings to the integers/floats you can use feature extraction techniques used in NLP like CountVectorizer, TfidifVectorizer, Word Embedding. You can refer this documentation - https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html