Skip to content
PYGWALKER
API Reference
Jupyter Walker APIs

Jupyter API

walk

import pygwalker as pyg
 
walker = pyg.walk(dataset)

Parameters

ParameterTypeDefaultDescription
datasetUnion[DataFrame, Connector]-The dataframe or connector to be used. refer Dataset Of Walker.
gidUnion[int, str]NoneID for the GraphicWalker container div, formatted as 'gwalker-{gid}'. If gid is None, it will be automatically generated.
field_specsOptional[Dict[str, FieldSpec]]NoneSpecifications of fields. Will be automatically inferred from dataset if not specified.
theme_keyLiteral['vega', 'g2']'g2'Theme type for the GraphicWalker.
appearanceLiteral['media', 'light', 'dark']'media'Theme setting. 'media' will auto-detect the OS theme.
specstr""Chart configuration data. Can be a configuration ID, JSON, or remote file URL.
use_kernel_calcboolNoneIf True, uses kernel computation for data, it can support high performance in larger dataset. Default to None, automatically determine whether to use kernel calculation.
kanaries_api_keystr""kanaries api key, Default to "".
default_tabLiteral["data", "vis"]"vis"default tab to show. Default to "vis".
use_cloud_calcboolFalseWhether to use cloud compute for datas, If true, it upload your data to kanaries cloud. Default to False.
**kwargsAny-Additional keyword arguments.

render

import pygwalker as pyg
 
walker = pyg.render(dataset, spec="./gw_config.json")

Parameters

ParameterTypeDefaultDescription
datasetUnion[DataFrame, Connector]-The dataframe or connector to be used. refer Dataset Of Walker.
specstr-Chart configuration data. Can be a configuration ID, JSON, or remote file URL.
theme_keyLiteral['vega', 'g2']'g2'Theme type for the GraphicWalker.
appearanceLiteral['media', 'light', 'dark']'media'Theme setting. 'media' will auto-detect the OS theme.
use_kernel_calcboolNoneIf True, uses kernel computation for data, it can support high performance in larger dataset. Default to None, automatically determine whether to use kernel calculation.
kanaries_api_keystr""kanaries api key, Default to "".
**kwargsAny-Additional keyword arguments.

table

import pygwalker as pyg
 
walker = pyg.table(dataset)

Parameters

ParameterTypeDefaultDescription
datasetUnion[DataFrame, Connector]-The dataframe or connector to be used. refer Dataset Of Walker.
theme_keyLiteral['vega', 'g2']'g2'Theme type for the GraphicWalker.
appearanceLiteral['media', 'light', 'dark']'media'Theme setting. 'media' will auto-detect the OS theme.
use_kernel_calcboolNoneIf True, uses kernel computation for data, it can support high performance in larger dataset. Default to None, automatically determine whether to use kernel calculation.
kanaries_api_keystr""kanaries api key, Default to "".
**kwargsAny-Additional keyword arguments.

Example

Kaggle Demo (opens in a new tab) Demo Code (opens in a new tab)

Related Q&A

My pygwalker cannot handle CSV > 1GB, what should I do?

PyGWalker has a internal engine based on DuckDB which allows you to handle much larger dataset with high performance. You can enable it with use_kernel_calc=True parameter.

How to set pygwalker's theme (light or dark)?

You can set the theme with dark parameter. Available values: dark | light | media. Default by media which will be automatically switched by the system.

Why my pygwalker is dark but my juypter is light?

pygwalker follows the system theme by default. But some juypters cannot follow the system theme. You can set the theme with dark='light' to make pygwalker to use light theme.

How to save the charts of pygwalker in juypter?

There is two ways to save pygwalker's charts and state. Save it into a file or export as code. More details (opens in a new tab)