<jupyter_start><jupyter_text>Cleaning the Data - Clean up references [1]- Convert running time into an integer- Convert dates into datetime object- Split up the long strings- Convert Budget and Box office to numbers<jupyter_code># clean up references (remove [1], [2] etc)

data[-10]
[movie.get('Running time', 'N/A') for movie in data]


def minute_to_integer(running_time):
    
    
    if running_time == 'N/A':
        return None
        
    if isinstance(running_time, list):
         return None
    else:
        return int(running_time.split(" ")[0])
       

for movie in data:
    movie['Running time (int)'] = minute_to_integer(movie.get('Running time', 'N/A'))
    
print([movie.get("Running time (int)", "N/A") for movie in data])
data[-30]
b<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12563451776649745, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 3.4829545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '231145', 'license': 'MIT', 'n_tokens_mistral': 259, 'n_tokens_neox': 249, 'n_words': 81, 'path': 'Data Analysis.ipynb', 'repo_name': 'rodrigoamorimml/Movie-Recommender-System', 'size': '788'}