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. 功能相对比较单一,比如散点图画趋势线,我没有找到具体的操作方法。可能做这个只是为了引流吧。
    总体来说是一个很好的看板工具。
相关推荐
吴佳浩19 分钟前
大模型量化部署终极指南:让700亿参数的AI跑进你的显卡
人工智能·python·gpu
diegoXie1 小时前
Python / R 向量顺序分割与跨步分割
开发语言·python·r语言
程序员小白条1 小时前
0经验如何找实习?
java·开发语言·数据结构·数据库·链表
七牛云行业应用1 小时前
解决OSError: No space left... 给DeepSeek Agent装上无限云硬盘
python·架构设计·七牛云·deepseek·agent开发
liulilittle2 小时前
C++ 浮点数封装。
linux·服务器·开发语言·前端·网络·数据库·c++
BoBoZz192 小时前
CutWithScalars根据标量利用vtkContourFilter得到等值线
python·vtk·图形渲染·图形处理
失散132 小时前
Python——1 概述
开发语言·python
萧鼎2 小时前
Python 图像哈希库 imagehash——从原理到实践
开发语言·python·哈希算法
qq_251533592 小时前
使用 Python 提取 MAC 地址
网络·python·macos
小小8程序员2 小时前
STL 库(C++ Standard Template Library)全面介绍
java·开发语言·c++