<jupyter_start><jupyter_text>In this Notebook I get the number of restaurant per zipcode in NYC 
 which I later use to merge with my original dataset<jupyter_code>import pandas as pd

r_df = pd.read_csv('/content/drive/MyDrive/airbnb/restaurant_data_set_2.csv')
r_df.columns<jupyter_output><empty_output><jupyter_text>Getting the number of different zipcode value counts to easily get how many zipcodes there are but I have to first convert to int then string to get more accurate answer<jupyter_code>r_df['ZIPCODE'].value_counts()
r_df = r_df[r_df['BORO'] !=  '0']
r_df['ZIPCODE'].isnull().sum().sum()
r_df = r_df[r_df['ZIPCODE'].notna()]

r_df['ZIPCODE'].isnull().sum().sum()
r_df = r_df['ZIPCODE'].value_counts().reset_index() # just want to get the number of zipcodes and their count 
r_df.rename(columns={"index":"zipcode","ZIPCODE":"count"},inplace=True)# rename 
r_df['zipcode'] 
r_df['zipcode'] = r_df['zipcode'].astype(int) # convert float to int 
r_df['zipcode']
 r_df['zipcode'] = r_df['zipcode'].astype(str)# convert int to string 
r_df['zipcode']<jupyter_output><empty_output><jupyter_text>Saving the dataset<jupyter_code># Import Drive API and authenticate.
from google.colab import drive

# Mount your Drive to the Colab VM.
#drive.mount('/content/drive')

# Write the DataFrame to CSV file.
with open('/content/drive/MyDrive/airbnb/restData.csv', 'w') as f:
  r_df.to_csv(f)
t = pd.read_csv('/content/drive/MyDrive/airbnb/restData.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1396761133603239, 'fraction_numerical': 0.001349527665317139, 'mean_word_length': 6.48989898989899, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '90559', 'license': 'MIT', 'n_tokens_mistral': 551, 'n_tokens_neox': 542, 'n_words': 129, 'path': 'restaurnat_data_cleansing.ipynb', 'repo_name': 'mrGecir/airbnbPrediction', 'size': '1482'}