Skip to content

Need help? Join our Discord Community!

PYGWALKER
PyGWalker

PyGWalker

PyGWalker 0.1.6 is released! Check out the changelog for more details.

Unleash Your Inner Data Explorer with PyGWalker (opens in a new tab)

PyPI version (opens in a new tab) Binder (opens in a new tab) PyPI downloads (opens in a new tab) conda-forge (opens in a new tab)

This PyGWalker Documentation instructs you how to use PyGWalker (opens in a new tab), a Python library that turns pandas and polars dataframes into a Tableau-like user interface for visual exploration.

PyGWalker (pronounced as "Pig Walker") is a quirky portmanteau of "Python binding of Graphic Walker". It fuses Jupyter Notebook (or other jupyter-based notebooks) with Graphic Walker (opens in a new tab). Data scientists can now build up data visualizations using straightforward dragging and dropping, instead of using Python codes!

You can try PyGWalker right now at Google Colab (opens in a new tab), Kaggle Code (opens in a new tab), Binder (opens in a new tab), or the Graphic Walker Online Demo (opens in a new tab)!

Supported Environment for PyGWalker

  • Jupyter Notebook
  • Google Colab
  • Kaggle Code
  • Jupyter Lab (WIP: A few pesky CSS bugs persist)
  • Jupyter Lite
  • Databricks Notebook (Since version 0.1.4a0)
  • Jupyter Extension for Visual Studio Code (Since version 0.1.4a0)
  • Hex Projects (Since version 0.1.4a0)
  • Most web applications in harmony with IPython kernels (Since version 0.1.4a0)
  • Streamlit (Since version 0.1.4.9), activated with pyg.walk(df, env='Streamlit')
  • ...venture forth and request more environments in the issues section.

PyGWalker will add more support such as R in the future.

Getting Started

Tested Environments

  • Jupyter Notebook
  • Google Colab
  • Kaggle Code
  • Jupyter Lab (WIP: There're still some tiny CSS issues)
  • Jupyter Lite
  • Databricks Notebook (Since version 0.1.4a0)
  • Jupyter Extension for Visual Studio Code (Since version 0.1.4a0)
  • Hex Projects (Since version 0.1.4a0)
  • Most web applications compatible with IPython kernels. (Since version 0.1.4a0)
  • Streamlit (Since version 0.1.4.9), enabled with pyg.walk(df, env='Streamlit')
  • ...feel free to raise an issue for more environments.
Run in Kaggle (opens in a new tab)Run in Colab (opens in a new tab)
Kaggle Code (opens in a new tab)Google Colab (opens in a new tab)

Setup pygwalker

Before diving in, please make sure to install the necessary packages through the command line using either pip or conda. Using Pip: To install PygWalker, simply run

pip install pygwalker

If you want to keep your version up-to-date with the latest release, try:

pip install pygwalker --upgrade

Alternatively, you can also use

pip install pygwalker --upgrade --pre

to obtain the latest features and bug-fixes.

Using Conda-forge:

To install PygWalker through conda-forge, run either

conda install -c conda-forge pygwalker

or

mamba install -c conda-forge pygwalker

For more help, check out the conda-forge feedstock.

Run PyGWalker

Once you have PygWalker installed, you can start using it in Jupyter Notebook by importing pandas and PygWalker.

import pandas as pd
import pygwalker as pyg

PygWalker integrates smoothly into your existing workflow. For example, to call up Graphic Walker with a dataframe, you can load your data using pandas and then run:

df = pd.read_csv('./bike_sharing_dc.csv', parse_dates=['date'])
gwalker = pyg.walk(df)

If you're using polars (version pygwalker>=0.1.4.7a0), you can also use PygWalker like this:

import polars as pl
df = pl.read_csv('./bike_sharing_dc.csv',try_parse_dates = True)
gwalker = pyg.walk(df)

For even more flexibility, you can try PygWalker online through Binder (opens in a new tab), Google Colab (opens in a new tab), or Kaggle Code (opens in a new tab).

That's it. Now you have a Tableau-like user interface to analyze and visualize data by dragging and dropping variables. PyGWalker with a Tableau-like UI

Data Visualization with PyGWalker

Now that you have PygWalker set up, you can use it for powerful data visualization. Change the mark type to create different types of charts, such as a line chart: graphic walker line chart

Compare different measures by creating a concat view with multiple measures in rows/columns: graphic walker area chart

Create a facet view with multiple subviews divided by a dimension value: graphic walker scatter chart

View your data frame in a table and configure analytic types and semantic types: page-data-view-light

With PygWalker, you have a Tableau-like user interface for analyzing and visualizing data simply by dragging and dropping variables. Happy exploring!

More information