Research breakthrough possible @S-Logix

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • +91- 81240 01111

Social List

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.

Sample Code

#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”)


find and drop missing values in a data set using python
import libraries
Find the missing values