Question: Data Cleaning: There are 7 , 3 6 1 rows in this dataset. I expect you to clean the data following the steps below using

Data Cleaning: There are 7,361 rows in this dataset. I expect you to clean the data following the steps below using code in some programming language. a. You need to figure out how to convert this dataset where there are two rows for each game to one row for each game. b. I want you to remove all games that are played on a neutral field. This means there is no home team and no away team. You can idenfy these games based off the value N in the 4th column. c. In your cleaned dataset, the first three variables need to be Date, Home, Away containing the date of the game, name of the home team, and name of the away team for each individual game. d. In your cleaned dataset, the fourth variable should be called HomeWins and this variable should be binary with a 1 indicang the home team won and a 0 indicang the home team lost. e. In the original dataset, PassCmp to TotalTO are all team stascs. In the cleaned dataset, there should be two variables for each team stasc. I want to create a variable starng with H for the home team, and a variable starng with A for the away team. For example, in your cleaned dataset, I want the fih variable to be HPassCmp (Passing compleons for the home team) and the sixth variable to be APassCmp (Passing compleons for the away team). Following this patern, the next variable in your cleaned dataset should be HPassAtt, then APassAtt, then HPassPct, then APassPct then ... you should get the point.

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 Databases Questions!