Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Load the data set hmeq _ small.csv ( Nicapotato . Vallala, Ajay. HMEQ _ Data. Kaggle, 2 5 Mar. 2 0 1 8 , www

Load the data set hmeq_small.csv (Nicapotato. "Vallala, Ajay. "HMEQ_Data." Kaggle, 25 Mar. 2018, www.kaggle.com/ajay1735/hmeq-data.) as a data frame.
Create a new data frame with all the rows with missing data deleted.
Create a second data frame with all missing data filled in with the mean value of the column.
Find the means of the columns for both new data frames.
Ex: Using only the first hundred rows, found in hmeq_sample.csv, the output is:
Means for df1 are LOAN 3208.333333
MORTDUE 67495.958333
VALUE 82529.125000
YOJ 8.500000
CLAGE 144.749455
CLNO 16.583333
DEBTINC 33.052122
dtype: float64
Means for df2 are LOAN 3045.918367
MORTDUE 49386.494253
VALUE 64033.483871
YOJ 8.179775
CLAGE 140.209320
CLNO 15.586957
DEBTINC 30.947152
dtype: float64Load the data set hmeq_small.csv (Nicapotato. "Vallala, Ajay. "HMEQ_Data." Kaggle, 25 Mar. 2018, www.kaggle.com/ajay1735/hmeq-data.) as a data frame.
Create a new data frame with all the rows with missing data deleted.
Create a second data frame with all missing data filled in with the mean value of the column.
Find the means of the columns for both new data frames.
Ex: Using only the first hundred rows, found in hmeq_sample.csv, the output is:
Means for df1 are LOAN 3208.333333
MORTDUE 67495.958333
VALUE 82529.125000
YOJ 8.500000
CLAGE 144.749455
CLNO 16.583333
DEBTINC 33.052122
dtype: float64
Means for df2 are LOAN 3045.918367
MORTDUE 49386.494253
VALUE 64033.483871
YOJ 8.179775
CLAGE 140.209320
CLNO 15.586957
DEBTINC 30.947152
dtype: float64

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

Influences on Nonverbal Communication?

Answered: 1 week ago