<jupyter_start><jupyter_text>Data Cleaning and Exploration on City Quality of Life Dataset<jupyter_code>import pandas as pd
# Load data into df
complete_df = pd.read_csv('uaScoresDataFrame.csv')

# Drop unwanted columns
complete_df = complete_df.drop(['Unnamed: 0'], 1)

# Round numerical data to 3 decimals
complete_df = complete_df.round(3)
complete_df
# Drop na values
complete_df.dropna()<jupyter_output><empty_output><jupyter_text>Note: Dropping na resulted in no change as the dataset we are using had some level of pre-processing already complete<jupyter_code>complete_df.describe()
complete_df.to_csv("Cleaned_CityLife.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08610271903323263, 'fraction_numerical': 0.006042296072507553, 'mean_word_length': 7.6103896103896105, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '555385', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 225, 'n_tokens_neox': 215, 'n_words': 59, 'path': 'data/DataCleaning_Exploration.ipynb', 'repo_name': 'DS4200-S22/final-project-city-comparison', 'size': '662'}