Hi,
I am having trouble figuring out how to Group Bar plot the pandas.core.series.Series below.
Not sure if this is a bug or I am doing something wrong.
If I convert the series to a dict, Bokeh makes a nice plot, but I cannot figure out how to plot the series where each origin
does not have a cyl of it’s own.
Thanks in advance…
Jim
from bokeh.charts import Bar, output_file, show
from bokeh.sampledata.autompg import autompg as df
from bokeh.plotting import output_notebook
output_notebook()
dataToPlot =df.groupby([‘cyl’,‘origin’]).mpg.mean()
print dataToPlot
type(dataToPlot)
cyl origin
3 3 20.550000
4 1 28.013043
2 28.106557
3 31.595652
5 2 27.366667
6 1 19.645205
2 20.100000
3 23.883333
8 1 14.963107
Name: mpg, dtype: float64
Out[12]:
pandas.core.series.Series
