Hi all,
Is there a way to allow users to add notes to a dataframe in Streamlit?
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?
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.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.