<jupyter_start><jupyter_text>NaN - Not a Number  1 .Dropping Method<jupyter_code># importing the dependencies
import numpy as np
import pandas as pd
# Loading the dataset
dataset = pd.read_csv('/content/Melbourne_housing_FULL.csv')
dataset.shape
dataset.head()
#checking which values are missing in the first 5 rows
dataset.isnull().head()  # Missing = True,
# Number of missing values for each column
dataset.isnull().sum()
# Identify the rows where the CouncilArea values is missing
dataset[dataset.CouncilArea.isnull()] 
# Dropping the rows even if contains one missing value
dataset.dropna(how='any').shape  # use inplace = true for changing origina data
# Dropping the rows even if contains all missing value
dataset.dropna(how='all').shape
dataset.shape
# Dropping the columns containing missing values
dataset.dropna(axis=1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08710801393728224, 'fraction_numerical': 0.003484320557491289, 'mean_word_length': 5.78740157480315, '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': '213519', 'license': 'MIT', 'n_tokens_mistral': 258, 'n_tokens_neox': 246, 'n_words': 91, 'path': 'Data Science/Data Preprocessing/Handling Missing Values - by Dropping/Handling_Missing_Values_by_Dropping.ipynb', 'repo_name': 'sandeeprawat28/Data-Science', 'size': '861'}