Tip
Static tables with st.table
are the most basic way to display dataframes. For the majority of cases, we recommend using st.dataframe
to display interactive dataframes, and st.data_editor
to let users edit dataframes.
Display a static table.
This differs from st.dataframe in that the table in this case is static: its entire contents are laid out directly on the page.
Function signature[source] | |
---|---|
st.table(data=None) | |
Parameters | |
data (pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, snowflake.snowpark.table.Table, Iterable, dict, or None) | The table data. |
Example
import streamlit as st import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5))) st.table(df)
Still have questions?
Our forums are full of helpful information and Streamlit experts.