<jupyter_start><jupyter_text>Performing a left join of df1 with df2. We specify the joining key as viewers and on the right as usersThis will include all elements in df1 and the users that will match with viewers.<jupyter_code>df = df1.merge(df2, left_on="viewers", right_on="users", how="left")
df.head()<jupyter_output><empty_output><jupyter_text>To handle the NaN value in the last column we replace it with the mean value of that column<jupyter_code>df.fillna(df.mean())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08928571428571429, 'fraction_numerical': 0.00992063492063492, 'mean_word_length': 6.769230769230769, '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': '212518', 'license': 'MIT', 'n_tokens_mistral': 165, 'n_tokens_neox': 163, 'n_words': 58, 'path': 'Lesson01/Exercise 4.ipynb', 'repo_name': 'FelixOnduru1/Data-Science-for-Marketing-Analytics', 'size': '504'}