用dw做旅游的网站的设计,做电器推广的网站,中职示范校建设专题网站,能下载各种应用的软件🗓️ 天 14
Streamlit 组件s
Streamlit 组件s 是第三方的 Python 模块,对 Streamlit 进行拓展 [1].
有哪些可用的 Streamlit 组件s?
好几十个精选 Streamlit 组件s 罗列在 Streamlit 的网站上 [2].
Fanilo(一位 Streamlit 创作者)在 wiki 帖子中组织了一个很棒的 St…🗓️ 天 14
Streamlit 组件s
Streamlit 组件s 是第三方的 Python 模块,对 Streamlit 进行拓展 [1].
有哪些可用的 Streamlit 组件s?
好几十个精选 Streamlit 组件s 罗列在 Streamlit 的网站上 [2].
Fanilo(一位 Streamlit 创作者)在 wiki 帖子中组织了一个很棒的 Streamlit 组件s 列表 [3]。截至 2022 年 4 月,其列出了约 85 个 Streamlit 组件s 。
如何使用?
Streamlit 组件s 只需要通过 pip 安装即可使用。
在这篇教程中,我们将教会你如何使用streamlit_pandas_profiling组件 [4].
安装组件 pip install streamlit_pandas_profiling 示例应用
代码
以下是如何使用这个组件来构建 Streamlit 应用: import streamlit as st
import pandas as pd
import pandas_profiling
from streamlit_pandas_profiling import st_profile_report#标题设定
st.header('`streamlit_pandas_profiling`')#导入数据文件
df = pd.read_csv('https://raw.githubusercontent.com/dataprofessor/data/master/penguins_cleaned.csv')pr = df.profile_report()
st_profile_report(pr) 逐行解释
创建 Streamlit 应用时要做的第一件事就是将streamlit库导入为st,以及导入其他要用到的库: import streamlit as st
import pandas as pd
import pandas_profiling
from streamlit_pandas_profiling import st_profile_report 然后紧跟着的是应用的标题文字: st.header('`streamlit_pandas_profiling`') 接下来我们使用pandas中的read_csv命令载入 Penguins 数据集。 df = pd.read_csv('https://raw.githubusercontent.com/dataprofessor/data/master/penguins_cleaned.csv') 最后,由profile_report()命令生成分析报告,并用st_profile_report显示出来: pr = df.profile_report()
st_profile_report(pr) 制作你自己的组件
如果你对于制作自己的组件感兴趣,请查阅以下这些资源:
制作组件发布组件组件 API有关组件的博客帖子如果你更愿意通过视频学习,我们的工程师 Tim Conkling 也做了一些超棒的教程:
如何构建一个 Streamlit 组件s | Part 1: 配置与架构如何构建一个 Streamlit 组件s | Part 2: 制作一个滑条组件有关组件的延伸阅读
Streamlit 组件s - API 文档精选 Streamlit 组件sStreamlit 组件s - 社区追踪streamlit_pandas_profiling🗓️ 天 15
st.latex
st.latex以 LaTeX 语法显示数学公式。
我们要做什么?