seaborn.boxplot和宽格式数据框

6

我有一个像这样的DataFrame

dataframe

我尝试了以下两个指令:

sns.boxplot([dataFrame.mean_qscore_template,dataFrame.mean_qscore_complement,dataFrame.mean_qscore_2d])

sns.boxplot(x = "mean_qscore_template", y= "mean_qscore_complement", hue = "mean_qscore_2d" data = tips)

我希望能在x轴上获得mean_qscore_templatemean_qscore_complementmean_qscore_2d的度量,y轴上是度量值,但是它并不起作用。

image

在文档中,他们提供了一个带有提示的示例,但是我的dataFrame没有以相同的方式组织。


1
请提供您遇到问题的样例代码。 - enclis
1个回答

12
您可以使用

sns.boxplot(data = dataFrame)

来为数据框的每个数值列制作箱线图。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接