examples/jupyter/integrations/bokeh.ipynb
import modin.pandas as pd
import pandas
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
from bokeh.io import show
# Create a visualization with Modin df
modin_data = pd.DataFrame.from_dict({'x_values': [1, 2, 3, 4, 5], 'y_values': [6, 7, 2, 3, 6]})
# create a ColumnDataSource by passing the dict
source = ColumnDataSource(modin_data)
p = figure()
p.circle(x='x_values', y='y_values', source=source)
show(p)
# Create a visualization with pandas df
pandas_data = pandas.DataFrame.from_dict({'x_values': [1, 2, 3, 4, 5], 'y_values': [6, 7, 2, 3, 6]})
# create a ColumnDataSource by passing the dict
source = ColumnDataSource(pandas_data)
p = figure()
p.circle(x='x_values', y='y_values', source=source)
show(p)