I am having trouble making a grouped bar chart with the given structure of my pandas df which looks like this:
yhat yhat_upper yhat_lower cat grp cycle_label
0 5.716087e+08 6.123105e+08 5.319125e+08 yello costs funding1
1 1.501483e+08 1.641132e+08 1.452377e+08 blue costs funding1
2 7.217570e+08 7.764237e+08 6.771502e+08 Total costs funding1
3 3.066355e+08 3.473373e+08 2.669394e+08 yello costs funding2
4 5.277504e+07 6.673995e+07 4.786445e+07 blue costs funding2
5 3.594106e+08 4.140773e+08 3.148039e+08 Total costs funding2
I want a bar chart that shows each "cat" column grouped by the "cycle_label" values along the x-axis. I've tried this but not working:
fig.add_trace(go.Bar(x=sum_matrix_tmp_df['cycle_label'], y=sum_matrix_tmp_df['yhat'],
name=sum_matrix_tmp_df['cat'])
Any help would be much appreciated!