streamlit

Duplicated sidebar in streamlit app because of calling function

Duplicated sidebar in streamlit app because of calling function Question: I am building stream lit app, I defined two function, sidebar, tab, etc. output of first function is simply a data frame, and output of the second function is chart. this way the sidebar checkbox are duplicated.. And I don’t know how to fix it? …

Total answers: 1

Assign different part of codes to st.button in streamlit app

Assign different part of codes to st.button in streamlit app Question: I am building an streamlit app, I defined 3 buttons. I have a large set of codes that does different things. If a user choose button1, it does something, if a user choose button2 it should perform other part of code and does something …

Total answers: 1

Streamlit slider resetting when changing max_value

Streamlit slider resetting when changing max_value Question: I have 2 sliders. The first slider (μ) determines the max_value for the second slider (σ²). Works great with the following code except for a major issue: mu = st.slider(‘$mu$’, 0.0, 5.0, 1.0, step=0.1) var = st.slider(‘$sigma^2$’, 0.0, mu, 1.0, step=0.1) The issue is that change mu, resets …

Total answers: 1

How to create nested dict with parent children hierachy for streamlit_tree_select from dataframe?

How to create nested dict with parent children hierachy for streamlit_tree_select from dataframe? Question: To use streamlit_tree_select I need to convert a dataframe to its expected structure. I guess to achieve the goal I could use pandas.groupby(‘parkey’) to group the children, but I’m not sure how to apply this to the appropriate parents while iterating …

Total answers: 1

Streamlit multiselect, if I don't select anything, doesn't show data frame

Streamlit multiselect, if I don't select anything, doesn't show data frame Question: I am building a Streamlit app. Part of my code includes multiselect as follows, when I dont select anything in multiselect, I want to show whole data frame without any filtration, but it doesn’t show any data, how should I modify the code? …

Total answers: 1

get a list of values from user in streamlit app

get a list of values from user in streamlit app Question: I want to get a list of values from user, but I have no idea how to perform. I tried with code as follows but this is not the correct way. import streamlit as st collect_numbers = lambda x : [str(x)] numbers = st.text_input("PLease …

Total answers: 4

How to download streamlit output data frame as excel file

How to download streamlit output data frame as excel file Question: I want to know if there is any way to download the output dataframe of streamlit as an Excel file using the streamlit button? Asked By: Manoranjini M || Source Answers: I suggest you edit your question to include a minimal reproducible example so …

Total answers: 1

How do round decimals when writing dataframe in streamlit

How do round decimals when writing dataframe in streamlit Question: import streamlit as st import pandas as pd data = {‘Days’: ["Sunday", "Wednesday", "Friday"], ‘Predictions’: [433.11, 97.9, 153.65]} df = pd.DataFrame(data) st.write(df) streamlit writes dataframe with four decimals by default, but i expected two decimals. With print() it produces the expected, and when st.write() is …

Total answers: 1

Streamlit on AWS: serverless options?

Streamlit on AWS: serverless options? Question: My goal is to deploy a Streamlit application to an AWS Serverless architecture. Streamlit does not appear to function properly without a Docker container, so the architecture would need to support containers. From various tutorials, EC2 is the most popular deployment option for Streamlit, which I have no interest …

Total answers: 1