diff --git a/README.md b/README.md index 265756f2..03cbac9a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ **PyGWalker** (pronounced like "Pig Walker", just for fun) is named as an abbreviation of "**Py**thon binding of **G**raphic **Walker**". It integrates Jupyter Notebook (or other jupyter-based notebooks) with [Graphic Walker](https://github.com/Kanaries/graphic-walker), a different type of open-source alternative to Tableau. It allows data scientists to analyze data and visualize patterns with simple drag-and-drop operations. -Visit [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing), [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test), [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kanaries/pygwalker/main?labpath=tests%2Fmain.ipynb) or [Graphic Walker Online Demo](https://graphic-walker.kanaries.net/) to test it out! +Visit [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing), [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test) or [Graphic Walker Online Demo](https://graphic-walker.kanaries.net/) to test it out! > If you prefer using R, you can check out [GWalkR](https://github.com/Kanaries/GWalkR) now! @@ -95,6 +95,8 @@ See [conda-forge feedstock](https://github.com/conda-forge/pygwalker-feedstock) ## Use pygwalker in Jupyter Notebook +### Quick Start + Import pygwalker and pandas to your Jupyter Notebook to get started. ```python @@ -105,27 +107,33 @@ import pygwalker as pyg You can use pygwalker without breaking your existing workflow. For example, you can call up Graphic Walker with the dataframe loaded in this way: ```python -df = pd.read_csv('./bike_sharing_dc.csv', parse_dates=['date']) +df = pd.read_csv('./bike_sharing_dc.csv') walker = pyg.walk(df) ``` -When you use pygwalker(>=0.2.0), we recommend using pygwalker by this way, more about pygwalker0.2.0: [here](https://docs.kanaries.net/en/pygwalker/changelog/pygwalker-0-2). +### Better Practice ```python -df = pd.read_csv('./bike_sharing_dc.csv', parse_dates=['date']) -walker = pyg.walk(df, spec="config.json", use_preview=True) - -# when pygwalker >= 0.3.0, you can use duckdb as computing engine, it can support larger datas and faster response. -walker = pyg.walk(df, spec="config.json", use_preview=True, use_kernel_calc=True) +df = pd.read_csv('./bike_sharing_dc.csv') +walker = pyg.walk( + df, + spec="./chart_meta_0.json", # this json file will save your chart state, you need to click save button in ui mannual when you finish a chart, 'autosave' will be supported in the future. + use_kernel_calc=True, # set `use_kernel_calc=True`, pygwalker will use duckdb as computing engine, it support you explore bigger dataset(<=100GB). +) ``` -You can use pygwalker with polars (since `pygwalker>=0.1.4.7a0`): -```python -import polars as pl -df = pl.read_csv('./bike_sharing_dc.csv',try_parse_dates = True) -walker = pyg.walk(df) -``` -You can even try it online, simply visiting [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kanaries/pygwalker/main?labpath=tests%2Fmain.ipynb), [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing) or [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test). +### Offline Example + +* Notebook Code: [Click Here](https://github.com/Kanaries/pygwalker-offline-example) +* Preview Notebook Html: [Click Here](https://pygwalker-public-bucket.s3.amazonaws.com/demo.html) + +### Online Example + +* [Kaggle Code For New Pygwalker](https://www.kaggle.com/code/lxy21495892/airbnb-eda-pygwalker-demo) +* [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test) +* [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing) + +*** diff --git a/pygwalker/api/pygwalker.py b/pygwalker/api/pygwalker.py index f0d6e4a2..6b26e314 100644 --- a/pygwalker/api/pygwalker.py +++ b/pygwalker/api/pygwalker.py @@ -11,7 +11,6 @@ from pygwalker.utils.display import display_html, display_on_streamlit from pygwalker.utils.randoms import rand_str from pygwalker.services.global_var import GlobalVarManager -from pygwalker.services.tip_tools import TipOnStartTool from pygwalker.services.render import ( render_gwalker_html, render_gwalker_iframe, @@ -143,9 +142,6 @@ def display_on_jupyter_use_widgets(self): use ipywidgets, Display on jupyter notebook/lab. When the kernel is down, the chart will not be displayed, so use `display_on_jupyter` to share """ - tips_tool = TipOnStartTool(self.gid, "widgets") - tips_tool.show() - comm = HackerCommunication(self.gid) preview_tool = PreviewImageTool(self.gid) data_source = get_max_limited_datas(self.origin_data_source, JUPYTER_WIDGETS_BYTE_LIMIT) diff --git a/pygwalker/api/walker.py b/pygwalker/api/walker.py index 576a045e..6f75d166 100644 --- a/pygwalker/api/walker.py +++ b/pygwalker/api/walker.py @@ -22,7 +22,7 @@ def walk( return_html: bool = False, spec: str = "", show_cloud_tool: bool = False, - use_preview: bool = False, + use_preview: bool = True, store_chart_data: bool = False, use_kernel_calc: bool = False, **kwargs