ITables is a Python package that renders Pandas DataFrames as interactive HTML tables, using the datatables.net Javascript library.
Both ITables and DataTables are open source and completely free to use (no community vs entreprise edition, no watermark - only MIT licences). ITables has been developed by myself since 2019, while DataTables has been developed by Allan Jardine since 2009.
Using the Streamlit Component of ITables is as simple as e.g.
from itables.streamlit import interactive_table
interactive_table(df)
Many options like caption, selected rows etc are available - see the documentation or start with this example:
interactive_table(df,
caption='Countries',
select=True,
selected_rows=[0, 1, 2, 100, 207],
buttons=['copyHtml5', 'csvHtml5', 'excelHtml5', 'colvis'])
ITables is not limited to Streamlit. You can also use it to get good looking tables in Jupyter Notebook, in VS Code, in Google Colab, in notebooks exported to HTML etc, and the options are the same in all these contexts.
Uses that have specific questions can have a look at
- The ITables documentation: https://mwouts.github.io/itables
- The DataTables official site: https://datatables.net
If you don’t find the answer there, please create an issue on the github project page: GitHub - mwouts/itables: Pandas DataFrames as Interactive DataTables
Question for streamlit admins: could I please get ITables listed at Components • Streamlit ? Thanks.