I’m new to Streamlit and it’s awesome so far. However, I feel I’ve reached the limit of what I am capable of without asking for help. My requirement is a simple one, but it seems it falls outside of the capabilities of the components and how they work currenlty. I feel I’m asking that bit too much…
Basically, I have some contacts in a database, and I want to record whether they have either paid and/or attended an event by adding two columns into a table (or grid) as shown in the example below. I already have the data in a table, no issues, it’s just adding the controls in to two columns at the end of the table that I need. And possibly how to update records in the database, although I’m confident that once I get over this initial hurdle I’ll be able to figure that bit out.
I’ve looked at columns, tables and aggrid so far, but it’s getting over my head. Am I missing something simple here, or should I move on to something that’s not Streamlit that would better suit my needs?
This is brilliant! Exactly what I needed, thank you very much.
For saving the resulting changes to the database, would I iterate throguh the data in new_data and write each change to the database, or is there a more efficient way? One thing I’m noticing is that for every 10 lines of code in .Net (I’m used to .Net development), there is a single line in Python!! Old habits die hard.
Hey, thanks again. That works, but it’s adding lots of duplicate entires into the database. I think I’m missing a fundamental understanding of how Streamlit works at this point. I just want to commit the entries in the upadated data (diff) dataframe and reload the page, yet the dataframe keeps getting bigger the more changes I add.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.