Can a user add notes to a dataframe?

Hi all,

Is there a way to allow users to add notes to a dataframe in Streamlit?

Hi @dxk5271, welcome to the forum! Can you explain more of what you’re looking for exactly? Do you just want to display some user-provided text above or below a dataframe, or something else?

1 Like

Hi @blackary thank you!

I have an Excel file that I would like to load and display in Streamlit . Is it possible to add a column for “Notes” to that Dataframe (whether that’s done before streamlit or within streamlit, it doesn’t matter) so I can collect input from users? I would need the user to go line by line in the Dataframe and add a note for each existing line.

This is how I’m currently loading in and displaying the DF. 100% open to approaching this a different way.


import pandas as pd
import streamlit as st

st.checkbox("Use container width", value=False, key="use_container_width")

df =('path/file.xlsx')

st.dataframe(df, use_container_width=st.session_state.use_container_width)

Hi @dxk5271,

Currently st.dataframes are not editable, but hopefully soon we will have a new native streamlit component to create editable dataframes. In the meantime, you can use streamlit-aggrid to create an editable dataframe. There are lots of aggrid-related posts on the forum to get you started.

Hope that’s helpful.