Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Find all x R that satisfy the equation |x + 1| + |x - 2| = 7.

Answered: 1 week ago

Question

Drag the approprlate labele to thelr reapective targeta

Answered: 1 week ago

Question

=+industrial action Under what circumstances can unions strike?

Answered: 1 week ago

Question

=+What forms of industrial action are common?

Answered: 1 week ago