Skip to content
Best Practices for Using Pygwalker in Kaggle

Best Practices for Using Pygwalker in Kaggle


In the Kaggle notebook, it is quite painful to have two different sessions reading and writing to the same file.

In the past, users import Pygwalker to generate their charts in Kaggle. When users saved their notebooks, they found that their charts disappeared. This is because Pygwalker requires a file to save the user's chart configurations, and performing this operation smoothly in Kaggle is not possible.

Below, three methods are introduced to save Pygwalker charts in a Kaggle notebook.

Use Kanaries Cloud File(Highly Recommended)

Demo Code

walker = pyg.walk(df, spec="ksf://<your_workspace_name>/<your_file_name>")

Click Save Icon To Save Your Conifg


Click the save icon to save your chart configurations. If the save is successful, all the charts you created using Pygwalker will be displayed when you save the notebook.

How To Get Kanaries Api Key

refer it: How to get api key of kanaries? (opens in a new tab)

How To Set Kanaries Api Key In Kaggle



Use Export Code Tool In Pygwalker

1. Click Export Code Icon


2. Copy Code


3. Paste the code, run it, and then you can save your notebook.

Use Quick Save In Kaggle