I'm generating a plot in pandas by first generating the following DataFrame:
plotData=resultData.groupby(['student_model','lo_id']).describe().nShots.unstack().reset_index()
plotData['se'] = plotData['std']/np.sqrt(plotData['count'])
The resulting dataframe looks like this:
Then I pivot and plot like so:
plotData.pivot(index='student_model',columns='lo_id',values='mean').plot(kind='bar')
Resulting in the following:
That's all fine, but I need to add the values from the "se" column as errorbars to the plot, and can't get it to work. I know I can add an argument to call to plot (i.e ...plot(kind='bar', yerr=???)
), but I don't know how to properly format this to make it work properly. Any ideas?