The Problem
Data scientists working in Jupyter Notebooks typically face a gap between code-based exploration (df.describe(), matplotlib calls) and interactive visual analysis tools like Tableau. Switching between a notebook and a separate BI tool breaks flow and requires exporting data. PyGWalker addresses this by embedding a Graphic Walker-style drag-and-drop UI directly into the notebook, operating on the in-memory dataframe.
What This Does
PyGWalker is a Python library that turns a pandas (or Polars, Modin, Spark) dataframe into an interactive visualization interface. The core entry point is pygwalker.api.pygwalker, which renders the UI. The frontend is a React/TypeScript app in app/, built with Vite and Tailwind, and the Python backend in pygwalker/ handles data parsing (pygwalker/dataparsers/), communication with the UI (pygwalker/communications/), and rendering across environments.
The library is environment-agnostic. pygwalker/api/ contains adapters for Jupyter, Streamlit, Gradio, Marimo, Reflex, and a standalone web server. The app/src/ directory contains the React UI components, including modal-based tools for exporting code (codeExportModal/), uploading charts (uploadChartModal/), and saving state (saveTool.tsx). The pygwalkertools/metrics/ module provides a separate metrics API.
How To Use It
Setup: Install via pip from pyproject.toml: pip install pygwalker. The frontend in app/ is built separately with yarn (app/package.json), but for typical notebook usage the pre-built assets are bundled in the Python package.
Running it: In a Jupyter notebook, the documented usage is:
import pandas as pd import pygwalker as pyg
df = pd.readcsv('yourdata.csv') pyg.walk(df)
For a web server, examples/webserverdemo.py shows the standalone server path. Streamlit users run examples/streamlitdemo.py. The bin/pygwalkercommand.py script is the CLI entry point.
Configuration: The pygwalker/services/config.py module handles configuration. Cloud features require a Kanaries account; pygwalker/services/kanariesclilogin.py handles authentication. The examples/gwconfig.json file shows a sample config structure.
Real-World Use
A typical workflow: a data analyst loads a dataset in a notebook, calls pyg.walk(df), and uses the UI to drag fields onto axes, filter, and annotate without writing plotting code. For a deployed dashboard, the same logic runs in a Streamlit app (examples/streamlitdemo.py), letting non-technical users explore data interactively. The code export modal (app/src/components/codeExportModal/) generates Python code from the visual spec, so users can transition from drag-and-drop to reproducible scripts.
Code Health & Issues
Med - Large surface area with many environment adapters (pygwalker/api/ has 12 modules). Each adapter is a separate integration point; expect uneven maintenance across them. Med - Tests are sparse relative to scope: 17 test files, mostly in tests/ covering data parsers and DSL transforms. The React UI in app/ has no test files. Low - The repo includes .pylintrc and CI workflows (.github/workflows/auto-ci.yml), indicating linting and automated checks are configured. Low - The pygwalker/utils/custom_sqlglot.py file suggests a vendored or patched dependency, which can complicate upgrades. Low - No license issues; LICENSE and CITATION.cff are present.
The Bottom Line
PyGWalker is a mature, well-architected library (forked from a 15k-star project) that solves a real workflow problem: interactive visual analysis without leaving the notebook. The multi-environment support is both its strength and its maintenance burden. It is best suited to data analysts and scientists who want Tableau-like exploration in Python, and to teams building internal data tools on Streamlit or Gradio. The UI code is not directly tested, so teams extending the frontend should add their own coverage.