个别箱线图

我有以下数据框。我想创建两个箱形图,以按类和EL_base显示LCC列。

df
    Class  ID   EL_base    LCC   
    PC1    1     0         240    
    PC1    1     1         241
    PC1    1     2         245    
    PC1    2     0         246    
    PC1    2     1         241
    PC1    2     2         243   
    PC1    3     0         246    
    PC1    3     1         241
    PC1    3     2         243   
    PC2    1     0         544
    PC2    1     1         541
    PC2    1     2         545
    PC2    1     3         546
    PC2    2     0         544
    PC2    2     1         541
    PC2    2     2         545
    PC2    2     3         546
    PC2    2     0         544
    PC2    2     1         541
    PC2    2     2         545
    PC2    2     3         546

我尝试了我的代码

   df.boxplot('LCC',by=['Class','EL_base'])

但是代码只给了我一个组合的箱形图,而不是每个类的单独图。

个别箱线图

jackchesun 回答:个别箱线图

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3078610.html

大家都在问