Pygwalker
Pygwalker (Python Graphic Walker) is a Python library that transforms pandas (and Polars) DataFrames into an interactive, Tableau-style user interface for data exploration and visualization directly within Jupyter Notebooks, Google Colab, and other compatible environments. It simplifies data analysis and visualization workflows by enabling drag-and-drop operations for quick visual insights. The library is actively developed, with the current version being 0.5.0.1, and sees regular updates to enhance features and performance.
Warnings
- deprecated The `use_kernel_calc` parameter in `pyg.walk()` is deprecated.
- breaking API changes were introduced in version 0.4.8, affecting general and Streamlit APIs.
- gotcha When using the `spec` parameter to save chart configurations, changes made in the UI are not automatically saved.
- gotcha Some cloud-integrated features, such as saving charts to the cloud or using advanced GPT-powered features, require a Kanaries token.
Install
-
pip install pygwalker -
pip install "pygwalker[snowflake]"
Imports
- pygwalker
import pygwalker as pyg
- StreamlitRenderer
from pygwalker.api.streamlit import StreamlitRenderer
- Connector
from pygwalker.data_parsers.database_parser import Connector
Quickstart
import pandas as pd
import pygwalker as pyg
# Create a sample DataFrame
data = {
'City': ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix'],
'Population': [8804190, 3898747, 2716075, 2325502, 1680992],
'Area_sq_mi': [302.6, 468.7, 227.6, 637.4, 517.6]
}
df = pd.DataFrame(data)
# Launch Pygwalker UI
# You can also use pyg.walk(df, kernel_computation=True) for better performance on large datasets.
walker = pyg.walk(df)