Skip to content
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

Interactive tables #271

Closed
maralski opened this issue Oct 4, 2019 · 6 comments
Closed

Interactive tables #271

maralski opened this issue Oct 4, 2019 · 6 comments
Labels
feature:st.dataframe type:enhancement Requests for feature enhancements or new features

Comments

@maralski
Copy link

maralski commented Oct 4, 2019

Problem

I often use interactive tables in ML projects. For example, to annotate a CSV interactively and train an ML model on each update. To achieve this we need the ability to interact with rows in a table. The ability to for example, highlight a table and click a button that has an action associated with it. The action would receive the highlighted row references as input and the program can then carry out any workflow on the rows (i.e. update ML model taking into account new annotated rows).

Solution

I currently use qgrid for this purpose. Would be great if we had a similar widget.

@maralski maralski added the type:enhancement Requests for feature enhancements or new features label Oct 4, 2019
@markopy
Copy link

markopy commented Oct 15, 2019

I have a similar use case where I would like to update the content of a secondary dataframe/table based on which row is selected on a primary dataframe. In my case there would ideally be no intermediate button click.

Perhaps there could be a selected_row member on dataframe objects which contains the row number of the selected row? A change would then trigger re-execution of the python code.

Single row selection is what I would need but it sounds like @maralski is asking for multi row selection which only triggers an update with a button click?

@maralski
Copy link
Author

Single row selection is what I would need but it sounds like @maralski is asking for multi row selection which only triggers an update with a button click?

Yes I would need multi row with button click otherwise it would force update per row selection which is probably going to be inefficient.

@treuille
Copy link
Contributor

If you want to select rows in a table, you can use this somewhat inelegant workaround, which will scale up to about 1000 rows or so. 👍

@maralski
Copy link
Author

If you want to select rows in a table, you can use this somewhat inelegant workaround, which will scale up to about 1000 rows or so. 👍

Thanks. I came up with a similar workaround but it felt unnatural :(

@deeplook
Copy link

Is there any roadmap for more qgrid-like features? I'm using single and multi-row selection, row filtering and column reordering a lot and find them essential. Not having these in streamlit is a serious blocker for me. Any workarounds like above are real obstacles and are considered weird/cumbersome at best, and lead to sticking with alternatives like qgrid otherwise.

@randyzwitch
Copy link
Contributor

Closing this, as this appears to exist as a custom component. If I'm misunderstanding this issue, please let me know and I'm happy to reopen

https://github.com/PablocFonseca/streamlit-aggrid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.dataframe type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

No branches or pull requests

7 participants