i was trying to do my lab exercise but there is error but i dont know whats the problem and where show i fix it. can anyone show me whats the problem so i can fix it? this is the code:
f, ax = plt.subplots (figsize = (10, 10))
sns.heatmap (df.corr (), annot = True, linewidths = .5, fmt = '.1f', ax=ax)
plt.show ()
and then this output show up:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[7], line 2
1 f, ax = plt.subplots (figsize = (10, 10))
----> 2 sns.heatmap (df.corr (), annot = True, linewidths = .5, fmt = '.1f', ax=ax)
3 plt.show ()
ValueError: could not convert string to float: 'Switzerland'
New contributor
nurul nadzirah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1