<jupyter_start><jupyter_text>Handling_Missing_Values  1. Removing Rows with missing Data* dropna()<jupyter_code># e.g Lets drop rows with missing temperature values
df.dropna(subset=["temperature"],inplace=True)
df
# Drop all rows containg NaN 
df.dropna(inplace=True)
df
# If NaN still exists, it is still okay

# Split into X and y
# and then into train set and test set
# the, fill up train set and test set separetly<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08222222222222222, 'fraction_numerical': 0.0022222222222222222, 'mean_word_length': 5.731343283582089, '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': '73685', 'license': 'MIT', 'n_tokens_mistral': 156, 'n_tokens_neox': 151, 'n_words': 55, 'path': 'Handling Missing Data/1_dropna.ipynb', 'repo_name': 'Jawwad-Fida/Feature-Engineering', 'size': '450'}