How to save selected points in a pandas data frame?

+1 for this idea - we’ve got a reliable way to save a text file, but it’s unclear how to get data from a javascript object into a separate python object… working in a jupyter notebook or on a bokeh server. Linked plots work great (see this post on linked plots/saving data) – but the selected object is not persistent… In that linked example, all of the data in the first chart (s1) is persistent

as an example after running the code at the link in a jupyter notebook, and then manually selecting data from the first chart

s1.data shows all the datapoints,

{‘x’: [0.3909169814195108,
0.7852990443136825,…
‘y’: [0.8320226897995028,
0.5446850662371783,

but s2 - which dynamically links to selected data in s1 returns and empty set

{‘x’: , ‘y’: }