You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Seaborn出现ValueError:无法识别x参数值`celsius`

解决Seaborn散点图的ValueError问题

你的问题出在参数名拼写错误:Seaborn的scatterplot函数接收数据集的参数是data,你写成了西班牙语的datos,导致函数无法读取你的数据集,自然找不到celsius这个列名。

修正后的代码如下:

import seaborn as sb     
sb.scatterplot(x="celsius", y="fahrenheit", data=data)

运行修正后的代码就能生成你期望的带X、Y轴数值标记的散点图了。如果还是报错,记得检查data数据集中确实存在celsius和fahrenheit列,且列名拼写完全一致(注意大小写敏感)。

内容的提问来源于stack exchange,提问作者Lucas Alexandre

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 16:02:01