I want to execute the following example from the doc in a jupyter notebook : https://seaborn.pydata.org/generated/seaborn.kdeplot.html
tips = sns.load_dataset("tips")
sns.kdeplot(data=tips, x="total_bill", hue="time")
But I get an error :
ValueError: could not convert string to float: 'Sun'
I use seaborn 0.10.1 and python 3.8.3
It works when I use :
tips = sns.load_dataset("tips")
sns.kdeplot(data=tips.total_bill)
But in this case, I can't use hue with the time column.
I fixed it by upgrading seaborn to 0.11 using :
pip install seaborn --upgrade
With conda, the version didn't upgrade after 0.10.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With