Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 2 : Using what you have learnt from lesson, find out if there are any missing data in the dataFrame. Show in your Jupyter

Task 2: Using what you have learnt from lesson, find out if there are any missing data in the dataFrame. Show in your Jupyter Notebook the number of missing data from column named "location", "date", "new cases", "new deaths", "stringency index". Filter these columns into a new dataErame named df filtered. For df filtered, drop all missing data. Discuss and show the code for two different types of ways to deal with missing data, apart from dropping all missing data.
Task 3: Define a function that takes a dataErame object as input, and output a new dataErame object with a new column named "Label". The data in column "Label" can be "low", "average" or "high", or "high risk" depending on the conditions stipulated below:
Determine the extend of testing which is the ratio of the total tests over the total cases in the country
Based on the extend of testing, we label according to the following:
a. If the extend of testing ratio is less than 20, label is "low"
b. If the extend of testing ratio is between 20 and 100, label is "average"
c. If the extend of testing ratio is more than 100, label is "high"
If the extend of testing is "low", and the Positive rate is more than 0.1, label is "high risk"
Note: your function should NOT be using global variables.
Task 4: Use the function to output a new dataErame, named df new, with a new column named "Label". Save this new dataFrame as "covid_processed.csv".
image text in transcribed

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

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago

Question

The company openly shares plans and information with employees.

Answered: 1 week ago