Question: Task 1: Data cleansing (50pt) - Week 3 [5pt] Please describe the data type for each variable in the dataset - whether it is a

Task 1: Data cleansing (50pt) - Week 3

[5pt] Please describe the data type for each variable in the dataset - whether it is a numerical or categorical or other variable. (You can add a text block in the notebook to answer the question).

Assuming we want to run analysis using variables: Survived, Pclass, Sex, Age, Fare, Embarked, and want to prepare a dataset for the analysis. Please do the items below:

[5pt] Create a subset of data which only contains selected variables. This should be a new Python variable only containing selected columns.

[5pt] For each variable, please check whether it has any missing values. If yes, how many missing values are there.

[10pt] If you see missing values on variables Survived, Pclass, Sex, Embarked, please removing the missing records.

[10pt] For missing values on variables Age, Fare, please replace the missing value using average age and average fare.

[10pt] If you identify any categorical variable(s), please use one-hot encoding to convert the variables.

[5pt] At the end, please print the final dataset, which only contains selected variable and is well cleaned. Please indicate the number of observations in the dataset.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!