-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cell selection functionality to st.dataframe
#6781
Comments
@xareelee Thanks for the suggestion! We are planning to add row selection to |
st.dataframe
return selected (row, column)
st.dataframe
@LukasMasuch Yes, in most instances, returning the selected row would be useful. |
That's a great start which also could help me with my use case. Currently, I want to reduce the dependency on the custom component for AgGrid because it's not actively maintained anymore. The missing piece for me would be selecting 1-n (multi-select + checkboxes) to implement all natively with st.data_editor / st.dataframe. |
btw. you can find a workaround for adding row selection in this comment: #688 (comment) |
Bump. I need to know metadata about the selected cell. The (row, column) combination represents a database entity in my case. Lets say (teacher, student) and the intersect is the numeric grade for that student in that teachers class. I want to know which cell is selected so that I can redirect to another page with more info on the (teacher, student). I need to know the teacher id and student id, which can be looked up via the row and column values. Alternatively, if there was a way to embed metadata in each cell that isn't seen by the user but can be referenced by me after a cell is selected... That could work too; I'd only need to embed the required metadata in each cell (saving the lookup step). |
Bump. Was looking for this feature. This is very much needed. |
Having cell based event callbacks help in building interactive dashboards. |
We are also quite interested in |
I managed to create a workaround in case anybody's interested. The code for this, as well as some earlier attempts, is available in the gist. Demo: |
Problem
In the official tutorial about
st.dataframe
, it provides a well interactive UI, but it lacks one important feature: indicate the selected(row, column)
.For example:
We can change the last line to the following:
And we can select a specific cell in the GUI:
Now we can do something with the selected row and/or column (in the above case:
row==4
andcolumn=="col 2"
). For example, we can show the detail info for the selected row.Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
The text was updated successfully, but these errors were encountered: