Can someone help me?
I’m trying to create the following with Pyton & Streamlit:
In Streamlit I should be able to enter a place name and then it should show the zip code. The basis for this is a CSV file with all postcodes in Switzerland.
Can someone help me how to do this best?
Below is my approach:
- Store the CSV using Pandas.
- Get input from the user (place)
- On clicking a button-the search function kicks in.
- On success, display the zipcode. Else an error message something like “Zipcode not found”.
Please find the below python code:
import pandas as pd
import streamlit as st
df=pd.read_csv(r’replace with your file’)
x=st.text_input(“Enter the Pincode”)
for index, row in df.iterrows():
Can you modify your code as above. (indentation is missing in yours)
Please refrain from asking other community members to build your app. We’d love to help you build it! But asking others to write your entire app takes away all the fun