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

Advertisements 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… 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

Advertisements 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’]]\… Read More Streamlit: not present 'id_vars' in DataFrame

Duplicated sidebar in streamlit app because of calling function

Advertisements 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)… Read More Duplicated sidebar in streamlit app because of calling function

How to make label in st.multiselect bigger/bolder

Advertisements 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… Read More How to make label in st.multiselect bigger/bolder

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

Advertisements 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… Read More How to make docker-build to cache the pip installs as well?

HTML, Customization Problems in Web Page's Footer Section

Advertisements 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">… Read More HTML, Customization Problems in Web Page's Footer Section