<jupyter_start><jupyter_text>Get Started With nGQL Jupyter Magic Extension  How To Install nGQL in Jupyter or iPythonFirst, install nGQL Magic with pip:```bash!pip install ipython-ngql```Second, load extension:```bash$load_ext ngql```<jupyter_code>%load_ext ngql<jupyter_output><empty_output><jupyter_text>How to UseConnect to Nebula Graph with:```bash%ngql --address  --port  --user  --password ```<jupyter_code>%ngql --address 127.0.0.1 --port 9669 --user user --password password<jupyter_output>Connection Pool Created<jupyter_text>Make a query after `Connection Pool Created` shown in the connection from last step:Option 1, it supports one line query as:```ngql%ngql ;```Option 2, it also supports multiple queries:```ngql%%ngql;;```> Note, we will support a 3rd option to enable runing lines from `.ngql` file soon.<jupyter_code>%ngql GO FROM "Tom" OVER owns_pokemon YIELD owns_pokemon._dst as pokemon_id | GO FROM $-.pokemon_id OVER owns_pokemon REVERSELY YIELD owns_pokemon._dst AS Trainer_Name
%%ngql
SHOW TAGS;
SHOW HOSTS;<jupyter_output><empty_output><jupyter_text>> It's quite easy, right?You could get help by `%ngql help` for some advanced usage:```ngql%ngql help```  Using Variables in Query StringWe used Jinja2(https://jinja.palletsprojects.com/) as templating method for variables in query string:```pythontrainer = "Sue"``````ngql%%ngqlGO FROM "{{ trainer }}" OVER owns_pokemon YIELD owns_pokemon._dst as pokemon_id | GO FROM $-.pokemon_id OVER owns_pokemon REVERSELY YIELD owns_pokemon._dst AS Trainer_Name;```<jupyter_code>trainer = "Sue"
%%ngql
GO FROM "{{ trainer }}" OVER owns_pokemon YIELD owns_pokemon._dst as pokemon_id | GO FROM $-.pokemon_id OVER owns_pokemon REVERSELY YIELD owns_pokemon._dst AS Trainer_Name;<jupyter_output><empty_output><jupyter_text>Using Raw thrift data type as resultBy default the result `ngql_result_style` is `pandas`, this enabled us to have table view renderred by Jupyter Notebook.While, if you would like to get raw results from `neutron2-python` itself, just configure it as below on the fly:```%config IPythonNGQL.ngql_result_style="raw"```And after querying, the result will be stored in `_`, plesae then refer it to a new variable for further ad-hoc tweaking on it like:```$ngql ;result = _dir(result)```<jupyter_code>%config IPythonNGQL.ngql_result_style="raw"
%%ngql USE pokemon_club;
GO FROM "Tom" OVER owns_pokemon YIELD owns_pokemon._dst as pokemon_id 
| GO FROM $-.pokemon_id OVER owns_pokemon REVERSELY YIELD owns_pokemon._dst AS Trainer_Name;
r = _
r.column_values(key='Trainer_Name')[0]._value.value<jupyter_output><empty_output><jupyter_text>> Change back to `pandas` `ngql_result_style`<jupyter_code>%config IPythonNGQL.ngql_result_style="pandas"
%%ngql
GO FROM "Tom" OVER owns_pokemon YIELD owns_pokemon._dst as pokemon_id 
| GO FROM $-.pokemon_id OVER owns_pokemon REVERSELY YIELD owns_pokemon._dst AS Trainer_Name;<jupyter_output><empty_output><jupyter_text>Only one takeaway: `% ngql help`!All you have to remember is to use `$ngql help` to have all hints :-)<jupyter_code>%ngql help<jupyter_output>Supported Configurations:
        ------------------------
        
        > How to config ngql_result_style in "raw", "pandas"
        %config IPythonNGQL.ngql_result_style="raw"
        %config IPythonNGQL.ngql_result_style="pandas"

        > How to config ngql_verbose in True, False
        %config IPythonNGQL.ngql_verbose=True

        > How to config max_connection_pool_size
        %config IPythonNGQL.max_connection_pool_size=10

        Quick Start:
        -----------

        > Connect to Neubla Graph
        %ngql --address 127.0.0.1 --port 9669 --user user --password password

        > Use Space
        %ngql USE nba

        > Query
        %ngql SHOW TAGS;

        > Multile Queries
        %%ngql
        SHOW TAGS;
        SHOW HOSTS;

        Reload ngql Magic
        %reload_ext ngql

        > Variables in query, we are using Jinja2 here
        name = "nba"
        %ngql USE "{{ name }}"
{'fraction_non_alphanumeric': 0.10430215107553777, 'fraction_numerical': 0.007253626813406703, 'mean_word_length': 4.275725593667546, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 38, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '361040', 'license': 'Apache-2.0', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1360, 'n_words': 397, 'path': 'examples/get_started.ipynb', 'repo_name': 'wey-gu/ipython-ngql', 'size': '3998'}