☰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

Can Selection Tool use an index defined in the dataset?

Community Support
Justin.Rouauld
Justin.Rouauld

Hi,

I have a plot that uses the Lasso Tool.

I have the following code

column_datasource.selected.on_change(“indices”, do_something)

so that I can work on the selected nodes in my plot based on indices of the Selection with the handler do_something

I was wondering if we could set the indices to an id column defined in the column_datasource. Right now, I’m wondering how the indices are generated by the column_datasource.

Thank you in advance!

⌁   Link to post
Bryan
Bryan

Hi @Justin.Rouauld,

This is not possible. The index for selections is always the basic positional index in to the list / array / Series that makes the column. And often times, it is also completely implicit (there need not be an actual column that has just the indices).

⌁   Link to post

End of archived discussion · Replies are disabled