pygwalker+streamlit python看板库使用体验

算作前言

在 B 站看到 pygwalker 的介绍,很感兴趣。

是一个类似于简化版的 tableau 工具。

原版 docs PyGWalker 文档 -- Kanaries

搭建看板

直接结合 streamlit 使用,streamlit 真的神器。

python 复制代码
import pygwalker as pyg
import pandas as pd
import streamlit.components.v1 as components
import streamlit as st 

# 调整Streamlit页面的宽度
st.set_page_config(page_title="在Streamlit中使用PyGWalker", layout="wide") 

# 添加标题
st.title("在Streamlit中使用PyGWalker") 
df = pd.read_csv(r"C:\Users\htwl\Desktop\2024-03-25T01-03_export.csv")
# 导入你的数据
# df = pd.read_csv("https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv") 
# 使用PyGWalker生成HTML
pyg_html = pyg.to_html(df) 
# 将HTML嵌入到Streamlit应用程序中
components.html(pyg_html, height=1000, scrolling=True)

看板介绍

看板视图

具体如何创建看 doc:使用 Graphic Walker 创建数据可视化 -- Kanaries

常规的柱状图、折线图、面积图、散点图都能做。

数据集视图

使用心得

  1. 类型为数据看板工具,优势是易上手,核心功能齐全搭建简单,方便分享,且免费。
  2. 缺点没有数据拼接功能,需要在 python 后台搭建好数据集。不能像 tableau 一样做表连接。
  3. 功能相对比较单一,比如散点图画趋势线,我没有找到具体的操作方法。可能做这个只是为了引流吧。
    总体来说是一个很好的看板工具。
相关推荐
用户8356290780511 天前
无需 Office:Python 批量转换 PPT 为图片
后端·python
markfeng81 天前
Python+Django+H5+MySQL项目搭建
python·django
GinoWi1 天前
Chapter 2 - Python中的变量和简单的数据类型
python
JordanHaidee1 天前
Python 中 `if x:` 到底在判断什么?
后端·python
ServBay1 天前
10分钟彻底终结冗长代码,Python f-string 让你重获编程自由
后端·python
闲云一鹤1 天前
Python 入门(二)- 使用 FastAPI 快速生成后端 API 接口
python·fastapi
Rockbean1 天前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
曲幽1 天前
FastAPI + Ollama 实战:搭一个能查天气的AI助手
python·ai·lora·torch·fastapi·web·model·ollama·weatherapi
用户60648767188961 天前
国内开发者如何接入 Claude API?中转站方案实战指南(Python/Node.js 完整示例)
人工智能·python·api
只与明月听1 天前
RAG深入学习之Chunk
前端·人工智能·python