In [1]:
import pygwalker as pyg
import pandas as pd
import duckdb

df = pd.read_csv("./sample_airbnb_open_datas.csv")
df
Out[1]:
Unnamed: 0 id NAME host id host_identity_verified host name neighbourhood group neighbourhood lat long ... minimum nights number of reviews last review reviews per month review rate number calculated host listings count availability 365 house_rules has_house_rules neihood_row_count
0 30823 22204133 HARLEM CLEAN & COMFY SPACE 18034423451 verified Alexander Manhattan Harlem 40.82669 -73.93832 ... 1.0 15.0 6/20/2019 2.38 5.0 1.0 45.0 Please be respectful of other guests. Keep th... True 4577
1 77739 29398393 Discounted Manhattan Superhost Garden Apartment 88888747253 verified Sean Manhattan Washington Heights 40.83135 -73.94210 ... 1.0 278.0 2/26/2022 4.05 3.0 2.0 239.0 NaN False 1436
2 3057 25692460 Your Sanctuary next to Times Square New York 19407051708 verified Dennis Manhattan Midtown 40.75721 -73.98013 ... 1.0 8.0 6/23/2019 4.21 5.0 7.0 50.0 All guests must agree to the following: 1. T... True 2438
3 18960 56737795 Glass factory loft 56782124447 verified Jacob Brooklyn Greenpoint 40.73792 -73.95541 ... 7.0 5.0 5/31/2019 0.16 4.0 1.0 0.0 NaN False 1661
4 83792 17572545 Heaven On Earth 34595028256 unconfirmed Winnie & Andy Bronx Williamsbridge 40.88049 -73.86130 ... 3.0 1.0 2/11/2018 0.06 2.0 4.0 0.0 Please no smoking in any of the inside premise... True 85
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
16771 22328 11493379 Beautiful sunlight room in the heart of Bushwick! 62059907364 unconfirmed Alina Brooklyn Bushwick 40.69935 -73.91332 ... 4.0 4.0 1/2/2018 0.16 1.0 1.0 189.0 Please smoke outside in the front of the build... True 4011
16772 73801 21706511 Comfortable- JFK,LGA Best Value 48992030362 verified Shared Stay-JFK The Hugh Suite Queens Springfield Gardens 40.66102 -73.77035 ... 1.0 57.0 6/21/2019 7.28 3.0 3.0 342.0 We will try to always treat you with loving ki... True 234
16773 73816 23107696 6 minutes from JFK Private Bedroom/Bathroom 15811744289 verified Lakshmee Queens Springfield Gardens 40.66670 -73.78469 ... 1.0 86.0 7/5/2019 13.30 5.0 8.0 335.0 Please remember that this is a residential bui... True 234
16774 6297 25746585 DELIGHTFUL 3Bed Upper East Side LOFT ~CENTRAL ... 21409316688 verified Tyler Manhattan Upper East Side 40.78323 -73.95094 ... 5.0 4.0 6/22/2019 2.67 3.0 1.0 93.0 NaN False 2954
16775 65833 54122655 Gorgeous & spacious room in Bed-Stuy 19726231279 unconfirmed Megan Brooklyn Bedford-Stuyvesant 40.68697 -73.95141 ... 3.0 2.0 5/29/2019 0.17 5.0 1.0 38.0 No pets. No smoking. Please :) True 6791

16776 rows × 28 columns

In [2]:
walker = pyg.walk(
    df,                      # your dataset, support pandas、polars、modin、spark(not recommended)
    spec="./gw0.json",       # this json 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=False,    # set `use_kernel_calc=True`, pygwalker will use duckdb as computing engine, it support you explore bigger dataset(<=100GB).
    use_preview=False,        # set `use_preview=True`, pygwalker will render preview charts when kernel stop.
)
In [3]:
# use `walker.display_chart`, you can render any saved charts of walker in any cells.

walker.display_chart("Chart 2", title="Distribution Of Room Type")
walker.display_chart("Chart 3", title="Distribution Of Neighbourhood Group")
walker.display_chart("Chart 8", title="Distribution Of Price")
walker.display_chart("Chart 9", title="Distribution Of Service Fee")
walker.display_chart("Chart 10", title="Distribution Of Construction Year")
walker.display_chart("Chart 11", title="Distribution Of Minimum Nights")

Distribution Of Room Type

Distribution Of Neighbourhood Group

Distribution Of Price

Distribution Of Service Fee

Distribution Of Construction Year

Distribution Of Minimum Nights

In [4]:
walker.display_chart("Chart 6", title="Top 20 Room Count For Neighbourhood")
walker.display_chart("Chart 7", title="Top 20 Median Price For Neighbourhood")
walker.display_chart("Chart 12", title="Top 20 Median Service Fee For Neighbourhood")

Top 20 Room Count For Neighbourhood

Top 20 Median Price For Neighbourhood

Top 20 Median Service Fee For Neighbourhood

In [5]:
walker.display_chart("Chart 14", title="relation of price and has_house_rule")
walker.display_chart("Chart 15", title="relation of room type and has_house_rule")
walker.display_chart("Chart 16", title="relation of price and service fee")

relation of price and has_house_rule

relation of room type and has_house_rule

relation of price and service fee

In [6]:
walker.display_chart("Chart 18", title="geo demo")

geo demo

In [ ]: