source = ColumnDataSource(data=dict(xvals=list(range(0, 10)), yvals=list(np
    .random.normal(0, 1, 10)), letters=[choice(ascii_lowercase) for _ in
    range(10)]))
p.scatter('xvals', 'yvals', source=source, fill_alpha=0.2, size=5)
select_tool = p.select(dict(type=BoxSelectTool))[0]
source.callback = CustomJS(args=dict(p=p), code=
    """
        var inds = cb_obj.get('selected')['1d'].indices;
        var d1 = cb_obj.get('data');
        console.log(d1)
        var kernel = IPython.notebook.kernel;
        IPython.notebook.kernel.execute("inds = " + inds);
        """
    )
show(p)
Get selected data contained within box select tool in Bokeh