☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

One Boxplot for each column of a DataFrame, but it fails

Community Support
Enrico_Rotundo
Enrico_Rotundo

I’d like to have a boxplot for each column of my dataframe (example), with pandas it’s as easy as df.plot.box*()*, but with Bokeh I must specify the categorical variable, even if it is an optional parameter.

`from bokeh.charts import BoxPlot, show
import pandas as pd

df = pd.DataFrame({‘one’: [1,2,3,7,8,4,-1,5,2,1], ‘two’:[1,1,1,2,2,2,2,1,1,1]})

this works

p1 = BoxPlot(df, values=‘one’, label=‘two’)
show(p1)

this compiles a HTML file but rendering fails with the message below

p2 = BoxPlot(df, values=‘one’)
show(p2)`

this also fails

p3 = BoxPlot(df)
show(p3)

``

⌁   Link to post
Enrico_Rotundo
Enrico_Rotundo

Here’s the error message: “null is not an object (evaluation ‘h.indexOf’)”

···

On Thursday, May 4, 2017 at 6:21:29 PM UTC+2, Enrico Rotundo wrote:

I’d like to have a boxplot for each column of my dataframe (example), with pandas it’s as easy as df.plot.box*()*, but with Bokeh I must specify the categorical variable, even if it is an optional parameter.

`from bokeh.charts import BoxPlot, show
import pandas as pd

df = pd.DataFrame({‘one’: [1,2,3,7,8,4,-1,5,2,1], ‘two’:[1,1,1,2,2,2,2,1,1,1]})

this works

p1 = BoxPlot(df, values=‘one’, label=‘two’)
show(p1)

this compiles a HTML file but rendering fails with the message below

p2 = BoxPlot(df, values=‘one’)
show(p2)`

this also fails

p3 = BoxPlot(df)
show(p3)

``

⌁   Link to post
Bryan
Bryan

Hi,

Bokeh is not the same as pandas. They have different nyerfaces, and the labels parameter is not optional, it is required to specify what column to do a groupby of:

http://bokeh.pydata.org/en/latest/docs/user_guide/charts.html#box-plots

If you’d like BoxPlot to behave differently then you can file a feature request issue in the bkcharts repo, which will soon be the new home of bokeh.charts:

https://github.com/bokeh/bkcharts

Thanks,

Bryan

···

On May 5, 2017, at 00:56, Enrico Rotundo enrico.rotundo@gmail.com wrote:

Here’s the error message: “null is not an object (evaluation ‘h.indexOf’)”

On Thursday, May 4, 2017 at 6:21:29 PM UTC+2, Enrico Rotundo wrote:

I’d like to have a boxplot for each column of my dataframe (example), with pandas it’s as easy as df.plot.box*()*, but with Bokeh I must specify the categorical variable, even if it is an optional parameter.

`from bokeh.charts import BoxPlot, show
import pandas as pd

df = pd.DataFrame({‘one’: [1,2,3,7,8,4,-1,5,2,1], ‘two’:[1,1,1,2,2,2,2,1,1,1]})

this works

p1 = BoxPlot(df, values=‘one’, label=‘two’)
show(p1)

this compiles a HTML file but rendering fails with the message below

p2 = BoxPlot(df, values=‘one’)
show(p2)`

this also fails

p3 = BoxPlot(df)
show(p3)

``

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bffa3cd4-1841-48d4-b909-eb6402916bb1%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled