This workaround enables you to select data interactively from plotly graphs in streamlit in a similar fashion to how you can do interactive graphing with dash. Most of this is achieved with the excellent streamlit-plotly-events library which allows you to pull up the plotly event data from a given plot.
This demo app demonstrates a function selected_indexes
which can be used to link the selected data back to dataframe used to generate the plot. Returning the dataframe indexes to easily filter on the selected data.
If using VScode, check out the .vscode/launch.json
which can be used to run debugging on live streamlit apps in development.
pip install plotly streamlit streamlit-plotly-events