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. 功能相对比较单一,比如散点图画趋势线,我没有找到具体的操作方法。可能做这个只是为了引流吧。
    总体来说是一个很好的看板工具。
相关推荐
xywww1683 小时前
大模型 API 选型实战:GPT、Gemini、Claude 接入时该看哪些指标?
运维·服务器·人工智能·python·gpt·langchain
夜雪一千8 小时前
Python enumerate() 函数完整详解:遍历同时获取索引,告别手动计数
服务器·windows·python
能有时光9 小时前
PyTorch KernelAgent 源码解读 ---(4)--- ExtractorAgent
人工智能·pytorch·python
_Jimmy_9 小时前
Python 协程库如何使用以及有哪些使用场景
python
aqi009 小时前
15天学会AI应用开发(十七)使用LangGraph实现会话记忆功能
人工智能·python·大模型·ai编程·ai应用
西门吹-禅10 小时前
java springboot N+1问题
java·开发语言·spring boot
第一程序员10 小时前
Rust Agent 子进程执行:Command 之前,先定义输入和超时
python·rust·github
skywalk816310 小时前
设计并实现段言的 C FFI 绑定机制 @Trae
c语言·开发语言·python·编程
weixin_BYSJ198710 小时前
SpringBoot + MySQL 乒乓球运动员信息管理系统项目实战--附源码04954
java·javascript·spring boot·python·django·flask·php
IT笔记11 小时前
【Rust】Rust Match 模式匹配详解
java·开发语言·rust