相关疑难解决方法(0)

使用Seaborn FacetGrid从数据框中绘制错误条

我想在Seaborn FacetGrid上的pandas数据框中的列中绘制误差条

import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar']*2,
                   'B' : ['one', 'one', 'two', 'three',
                         'two', 'two', 'one', 'three'],
                  'C' : np.random.randn(8),
                  'D' : np.random.randn(8)})
df
Run Code Online (Sandbox Code Playgroud)

示例数据帧

    A       B        C           D
0   foo     one      0.445827   -0.311863
1   bar     one      0.862154   -0.229065
2   foo     two      0.290981   -0.835301
3   bar     three    0.995732    0.356807
4   foo     two      0.029311    0.631812
5   bar     two      0.023164   -0.468248
6   foo     one     -1.568248    2.508461
7 …
Run Code Online (Sandbox Code Playgroud)

python plot matplotlib pandas seaborn

10
推荐指数
1
解决办法
2万
查看次数

标签 统计

matplotlib ×1

pandas ×1

plot ×1

python ×1

seaborn ×1