Mutate charts

Sometimes you display a chart or dataframe and want to modify live as the app runs (for example, in a loop). Depending on what you're looking for, there are 3 different ways to do this:

  1. Using st.empty to replace a single element.
  2. Using st.container or st.columns to replace multiple elements.
  3. Using add_rows to append data to specific types of elements.

Here we discuss that last case.

Concatenate a dataframe to the bottom of the current one.
Function signature

element.add_rows(self, data=None, **kwargs)


data (pandas.DataFrame, pandas.Styler, numpy.ndarray, Iterable, dict,)

No description

or None (null)

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).

Was this page helpful?

editSuggest edits

Still have questions?

Our forums are full of helpful information and Streamlit experts.