相关疑难解决方法(0)

Matplotlib 循环遍历多个子图的 seaborn 图中的轴

我想在 seaborn 直方图 (distplot) 上创建五个子图(数据框特定列中的每个类别一个)。

我的数据集是:

prog score
cool 1.9
cool 3.7
yay  4.5
yay  2.6
neat 1.4
neat 7
neat 6
wow  4.1
wow  1.7
wow  1.4
hooray 6.6
hooray 5.6
hooray 4.9
yikes 1.2
yikes 3.9
yikes 6.9
Run Code Online (Sandbox Code Playgroud)

我不希望所有的 'prog's 都被绘制出来,只是一个列表中的每个:

prog score
cool 1.9
cool 3.7
yay  4.5
yay  2.6
neat 1.4
neat 7
neat 6
wow  4.1
wow  1.7
wow  1.4
hooray 6.6
hooray 5.6
hooray 4.9
yikes 1.2
yikes 3.9
yikes 6.9
Run Code Online (Sandbox Code Playgroud)
prog_list …
Run Code Online (Sandbox Code Playgroud)

python loops matplotlib pandas seaborn

0
推荐指数
1
解决办法
2796
查看次数

标签 统计

loops ×1

matplotlib ×1

pandas ×1

python ×1

seaborn ×1