- Contents
- st.table
- element.add_rows
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
Function signature[source] | |
---|---|
element.add_rows(data=None, **kwargs) | |
Parameters | |
data (pandas.DataFrame, pandas.Styler, pyarrow.Table, numpy.ndarray, pyspark.sql.DataFrame, snowflake.snowpark.dataframe.DataFrame, Iterable, dict, or None) | Table to concat. Optional. |
**kwargs (pandas.DataFrame, numpy.ndarray, Iterable, dict, or None) | The named dataset to concat. Optional. You can only pass in 1 dataset (including the one in the data parameter). |
Example
You can do the same thing with plots. For example, if you want to add more data to a line chart:
And for plots whose datasets are named, you can pass the data with a keyword argument where the key is the name:
Still have questions?
Our forums are full of helpful information and Streamlit experts.