全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

topic:homelab gists with given topic

登錄


全部 新建 登錄

All gists matching topic charts

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新

timmy / Streamlit 資料視覺化與互動選擇

0 喜歡
0 分支
1 檔案
最後活躍 10 months ago
此範例展示如何使用 Streamlit 建立互動式數據視覺化,包含多重選擇 (multiselect) 和切換開關 (toggle) 來調整數據顯示,並透過 line_chart 繪製折線圖,讓使用者輕鬆分析數據趨勢。
charts data-visualization interactive-widgets numpy pandas streamlit
1 import streamlit as st
2 import pandas as pd
3 import numpy as np
4
5 st.write("Streamlit supports a wide range of data visualizations, including [Plotly, Altair, and Bokeh charts](https://docs.streamlit.io/develop/api-reference/charts). 📊 And with over 20 input widgets, you can easily make your data interactive!")
6
7 all_users = ["Alice", "Bob", "Charly"]
8 with st.container(border=True):
9 users = st.multiselect("Users", all_users, default=all_users)
10 rolling_average = st.toggle("Rolling average")
上一頁 下一頁

由 Opengist 提供支持 ⋅ Load: 24ms⋅

繁體中文
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文