Tell us what’s happening:
corr = sales.corr() can’t convert str to float: ‘November’ in Data Analysis Example A
corr = sales.corr() #returns
ValueError: could not convert string to float: ‘November’
I’ve tied calling other methods but none work. I found a stack exchange post which suggests cat.codes
to convert string to int.
What is the best way to remedy the error?
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0
Challenge Information:
Data Analysis with Python - Data Analysis Example A