Jupyter API
walk
import pygwalker as pyg
walker = pyg.walk(dataset)
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
dataset | Union[DataFrame, Connector] | - | The dataframe or connector to be used. refer Dataset Of Walker. |
gid | Union[int, str] | None | ID for the GraphicWalker container div, formatted as 'gwalker-{gid}'. If gid is None, it will be automatically generated. |
field_specs | Optional[Dict[str, FieldSpec]] | None | Specifications of fields. Will be automatically inferred from dataset if not specified. |
theme_key | Literal['vega', 'g2'] | 'g2' | Theme type for the GraphicWalker. |
dark | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
spec | str | "" | Chart configuration data. Can be a configuration ID, JSON, or remote file URL. |
use_kernel_calc | bool | None | If 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_key | str | "" | kanaries api key, Default to "". |
default_tab | Literal["data", "vis"] | "vis" | default tab to show. Default to "vis". |
use_cloud_calc | bool | False | Whether to use cloud compute for datas, If true, it upload your data to kanaries cloud. Default to False. |
**kwargs | Any | - | Additional keyword arguments. |
render
import pygwalker as pyg
walker = pyg.render(dataset, spec="./gw_config.json")
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
dataset | Union[DataFrame, Connector] | - | The dataframe or connector to be used. refer Dataset Of Walker. |
spec | str | - | Chart configuration data. Can be a configuration ID, JSON, or remote file URL. |
theme_key | Literal['vega', 'g2'] | 'g2' | Theme type for the GraphicWalker. |
dark | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
use_kernel_calc | bool | None | If 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_key | str | "" | kanaries api key, Default to "". |
**kwargs | Any | - | Additional keyword arguments. |
table
import pygwalker as pyg
walker = pyg.table(dataset)
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
dataset | Union[DataFrame, Connector] | - | The dataframe or connector to be used. refer Dataset Of Walker. |
theme_key | Literal['vega', 'g2'] | 'g2' | Theme type for the GraphicWalker. |
dark | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
use_kernel_calc | bool | None | If 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_key | str | "" | kanaries api key, Default to "". |
**kwargs | Any | - | 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)