How to find and drop missing values in a data set using python?


To find missing values in a data sample
and drop those missing values in python.

   Import pandas library, because
the data pre processing is mostly
done by using pandas function.

  Read the sample data.

  Make it as a data frame.

  Find the missing value and drop
those samples using pandas inbuilt
functions,df.isnull() and df.dropna().

  Whenever we using isnull(),it finds
missing values in the data set.

  Whenever we using dropna(),it
drop entire sample in a data set.

#import libraries

import pandas as pd

#Read the sample data



#create data frame


print(“Actual data frame is:\n”,df)

#Find the missing values

print(“Find missing values”)


#Drop the missing values(Nan)

print(“Drop missing values”)


Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit