Streamlit 101 - A faster way to build and share data apps
Vložit
- čas přidán 27. 07. 2024
- In this video, @DataProfessor provides an overview of Streamlit and how you can get started in building your own interactive data apps in no time.
Streamlit is an open-source Python framework for data scientists and AI/ML engineers to deliver dynamic data apps - in only a few lines of code.
Getting started resources
- App starter kit: 🐙 github.com/streamlit/app-star... | 📖 blog.streamlit.io/streamlit-a...
- Deploy to Streamlit Community Cloud: 📺 • How to Deploy Your App... | 📖 blog.streamlit.io/host-your-s..., docs.streamlit.io/deploy/stre...
- Is a written tutorial more your style? Check out the accompanying blog post: blog.streamlit.io/streamlit-1...
Timeline
0:00 Introduction
1:14 How does Streamlit work?
1:36 Getting started with Streamlit
3:33 Extending Streamlit functionality
4:05 Deploying Streamlit apps
#streamlit #dataapps #dataapp #webapp #python #datascience - Zábava
Streamlit ois indeed a powerfull tool !
I like DataProfessor. I would like more videos from him:) Like this video)
Thanks Dmitry for the support :)
while plotting the line chart, is it default setting in streamlit that it takes the browser timezone information, even if the dataframe is in to different timezone.
Good video on streamlit. Is it possible to drill down and drill across on a chart in streamlit? Grt if there is any document. Thanks
I suppose you could use the highcharts library?
Does this support VPython? if so can you make a video about that
Considering recent events. It might be better to distance Streamlit from Snowflake.
what about how to use database to save data and retrieve
Thanks a lot for this video. Could you please show how to deploy a Streamlit app that connects to a PostgreSQL database?
Happy to help! Try this documentation: docs.streamlit.io/develop/tutorials/databases/postgresql
If you still run into questions, please let us know on the forum! discuss.streamlit.io/
athane le code pour postgresql:
import streamlit as st
import psycopg2
import pandas as pd
import matplotlib.pyplot as plt
# Connect to the PostgreSQL database
conn = psycopg2.connect(dbname="dbname", user="youruser", password="yourpassword", host="localhost")
# Allow user to select data to visualize
table = st.selectbox("Select table", ["billions", "countries"])
# Write a function to query data from the table
@st.cache_resource
def load_data(table):
cur = conn.cursor()
cur.execute(f"SELECT * FROM {table}")
rows = cur.fetchall()
cur.close()
return rows
# Load data into a pandas DataFrame
rows = load_data(table)
df = pd.DataFrame(rows, columns=["country_id", "country"]) # Replace with actual column names
# Create a bar chart
plt.figure(figsize=(8, 6))
plt.bar(df["country_id"], df["country"])
plt.xlabel("X-axis label")
plt.ylabel("Y-axis label")
plt.title("Bar Chart")
st.pyplot(plt)
# Close the database connection
conn.close()