Professional Documents
Culture Documents
Experiment-1
PROBLEM :
Demonstrate possible missing value analysis approaches using any real world
data.
PROCEDURE :
1) In the first step we import python libraries panda and numpy.
2) Then we will create .csv file in the same folder with your code. This will
work import pandas as pd data = pd.read_csv('data.csv').
3) We will get the output of the first 10 rows of our data.
4) This will tell us the total number of NaN in or data.
5) If the missing value isn’t identified as NaN , then we have to first convert
or replace such non NaN entry with a NaN.
6) This method reduces the quality of our model as it reduces sample size
because it works by deleting all other observations where any of the
variable is missing.
7) Order Quantity, Sales, profit are column name for our train data.
8) Now we will replace all NaN values with the mean of the non null values.
9) Then we will check whether Order Quantity, Sales, profit attribute have
null value or not.
10) At last we will print the Output in which all the missing values will be
filled accordingly.
OUTPUT :