Bokeh is a Python interactive visualization library.

To use Bokeh, install the Bokeh PyPI package through the Libraries UI, and attach it to your cluster.

To display a Bokeh plot in Databricks:

  1. Generate a plot following the instructions in the Bokeh documentation.

  2. Generate an HTML file containing the data for the plot, for example by using Bokeh’s file_html() or output_file() functions.

  3. Pass this HTML to the Databricks displayHTML() function.


    The maximum size for a notebook cell, both contents and output, is 20MB. Make sure that the size of the HTML you pass to the displayHTML() function does not exceed this value.

Notebook example: Bokeh

The following notebook shows a Bokeh example.

bokeh demo notebook

Open notebook in new tab