I am trying to take user inputs and put them into a dataframe via a dictionary, but I get a "Length of values does not match length of index error

I’m currently using the Streamlit library on python to make a webapp for one of my projects that will take user input data from interacting with sliders. However, when I try to store the user input data into a dataframe via a dictionary, I’m getting the following error: ValueError: Length of values (4) does not… Read More I am trying to take user inputs and put them into a dataframe via a dictionary, but I get a "Length of values does not match length of index error

Streamlit: not present 'id_vars' in DataFrame

To be honest, I’m new to Pandas and to Streamlit, however, I tried to do some stuff for my personal interest. Here’s the script so far: import pandas as pd import streamlit as st st.title(‘Vaccine Overview’) @st.cache_data def get_data(): df = pd.read_csv(‘https://opendata.sozialversicherung.at/eimpfpass/COVID19_vaccination_agegroups_v202210.csv’, sep=’;’) return df df = get_data() df_age_vacc = df.query(‘state_id == 11’)\ [[‘age_group’,’vaccine’,’vaccinations_administered_cumulative’]]\ .groupby([‘age_group’,’vaccine’])[‘vaccinations_administered_cumulative’]\… Read More Streamlit: not present 'id_vars' in DataFrame

Duplicated sidebar in streamlit app because of calling function

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? def func(key1, key2, key3): option_1 = st.sidebar.checkbox(‘x1’, key={key1}, value=True) option_2… Read More Duplicated sidebar in streamlit app because of calling function

How to make label in st.multiselect bigger/bolder

I am looking to make the label of multiselect bigger / bolder, my code looks like this : choice_mode = st.multiselect("Chose Mode", [‘A’,’B’,’C’], default="*") I have tried adding this : st.markdown(".stTextInput > label {font-size:105%; font-weight:bold; color:blue;} ",unsafe_allow_html=True) #for all text-input label sections st.markdown(".stMultiSelect > label {font-size:105%; font-weight:bold; color:blue;} ",unsafe_allow_html=True) #for all multi-select label sections from… Read More How to make label in st.multiselect bigger/bolder

How to make docker-build to cache the pip installs as well?

I am working with the following Dockerfile. FROM ubuntu RUN apt-get update RUN apt-get install -y \ python3.9 \ python3-pip COPY . /app WORKDIR /app RUN pip install -r requirements.txt EXPOSE 8501 ENTRYPOINT [ "streamlit", "run" ] CMD ["app.py"] Whenever, I rebuild the image, the docker uses the previously cached version of image and builds… Read More How to make docker-build to cache the pip installs as well?

HTML, Customization Problems in Web Page's Footer Section

The code: (Between footer=""" and """ includes html format code) footer="""<meta name="viewport" content="width=device-width, initial-scale=1"> <style> a:link , a:visited{ color: blue; background-color: transparent; text-decoration: underline; } a:hover, a:active { color: red; background-color: transparent; text-decoration: underline; } .footer { position: static ; left: 0; bottom:0; width:100%; background-color:white ; color: black; text-align: center; } </style> <div class="header"> <p><b>Get… Read More HTML, Customization Problems in Web Page's Footer Section

How to run a containerized streamlit app in a headless/noninteractive mode?

Streamlit server (run e.g. with streamlit run app-name.py) upon first run for each user requires interaction from her – accepting or rejecting this intro message: Welcome to Streamlit! If you are one of our development partners or are interested in getting personal technical support, please enter your email address below. Otherwise, you may leave the… Read More How to run a containerized streamlit app in a headless/noninteractive mode?