text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

data = pd.read_csv('../input/airbnbnewyork/listings.csv')

data.shape

data.isnull().sum()

data.drop(['id', 'host_name', 'last_review'], axis=1, inplace=True)

data.fillna({'reviews_per_month': 0}, inplace=True)
data.reviews_per_month.isnull().sum()

data.neighbourhood_group.unique()

len(data.neighbourhood.unique())

data.room_type.unique()

#we will skip first column for now and begin from host_id

#let's see what hosts (IDs) have the most listings on Airbnb platform and taking advantage of this service
top_host=data.host_id.value_counts().head(10)
top_host

sns.set(rc={'figure.figsize': (10, 8)})
sns.set_style('white')

top_host_df = pd.DataFrame(top_host)
top_host_df.reset_index(inplace=True)
top_host_df.rename(columns={'index': 'Host_ID', 'host_id': 'P_Count'}, inplace=True)
top_host_df

viz_1 = sns.barplot(x='Host_ID', y='P_Count', data=top_host_df, palette='Blues_d')
viz_1.set_title('Hosts with the most listings in NYC')
viz_1.set_ylabel('Count of listings')
viz_1.set_xlabel('Host IDs')
viz_1.set_xticklabels(viz_1.get_xticklabels(), rotation=45)