Render selected recoards of dataframe on the fly

Hi all,

I am currently using streamlit to design a webapp to do large database query, basically we query database with million to tens of millions records with some range filtering, and the resulting df should be tens of thousands and will be rendered as the dataframe from streamlit side.

However, Iโ€™d like to on-the-fly do some computation, for example, based on the values of a specific column, there should be an image associated with that value, but doing this for tens of thousands of records may take lots of time, so I am wondering is there anyway to:

  1. based on the rows on display (you can scroll up and down to only show 10-15 records) and do such computation and render them on-the-fly

  2. any on-hover callback should be useful too, like you mouse over to that cell and it will trigger an a pop-up image.

either 1) or 2) should do that work but I am more looking for some solutions like 1), I tried to search the official streamlit docs but doesnโ€™t find a straightforward solution, any suggestions are much appreciated!

Thanks!

Hi @xuyan-ru

You could make use of a range of various Python libraries to do the mentioned tasks. Iโ€™m appending various links along with my comments:

Hope this helps!