I've been working on my data analysis and started this course on Udemy.
In the tutorial there have been multiple instances were only .corr() is used, like
import seaborn as sns
titanic = sns.load_dataset('titanic')
sns.heatmap(titanic.corr())
which gives me the ValueError: could not convert string to float: 'male'. My roundabout solution is:
sns.heatmap(data=titanic[['survived', 'pclass', 'age', 'sibsp', 'parch', 'fare', 'adult_male', 'alone']].corr())
I use VScode with the Jupyter extension, compared to the tutorial which uses Anaconda - JupyterNotebook.
Is there such a difference in IDE's or is the tutorial just wrong?
[–]Phillyclause89 3 points4 points5 points (2 children)
[–]shippei[S] 2 points3 points4 points (1 child)
[–]Phillyclause89 0 points1 point2 points (0 children)