How to persist the charts I made through pygwalker?

I am using Pygwalker to create some charts for my analysis, but I am unable to save the charts I have created.

Every time I reopen the notebook or refresh the notebook page, the charts I made before disappear.

I want to share the charts I created using Pygwalker with others, but they cannot see the charts through my shared ipynb file.

I want to know how to persist the charts I made through pygwalker.

Python - 3.11.3

I’ve already saved my notebook, but I found that my charts got cleared when I refresh it.

1 Like

pygwalker(<0.2.0)

click “export_code”, and copy code showed in modal.


pygwalker(>=0.2.0)

version 0.2.0 has many important updates.

  1. import pygwalker and your datas.

    import pandas as pd
    import pygwalker as pyg
    
    
    df = pd.read_csv("xxx")
    walker = pyg.walk(df, spec="config.json", use_preview=True)
    
  2. explore datas and make charts, click “save” button to save your charts, chart config would save in the json file(spec).

  1. use display_chart function to display your saved charts in any cells.

    walker.display_chart("Your Chart Name")
    

more details about pygwalker(0.2.0): here