我首先生成以下DataFrame,在pandas中生成一个图:
plotData=resultData.groupby(['student_model','lo_id']).describe().nShots.unstack().reset_index()
plotData['se'] = plotData['std']/np.sqrt(plotData['count'])
Run Code Online (Sandbox Code Playgroud)
结果数据框如下所示:

然后我像这样转动和绘图:
plotData.pivot(index='student_model',columns='lo_id',values='mean').plot(kind='bar')
Run Code Online (Sandbox Code Playgroud)
导致以下结果:

这一切都很好,但我需要将"se"列中的值作为错误栏添加到绘图中,并且无法使其工作.我知道我可以添加一个参数来调用plot(即...plot(kind='bar', yerr=???)),但我不知道如何正确格式化它以使其正常工作.有任何想法吗?