
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![Prepare DataFrames for Grading
Do not make changes to the below code
After completing all data preparation tasks, run the following four cells to prepare your DataFrame for grading by:
1. Outputting the features and response DataFrames (you do not need to print).
2. Using the NumPy around() function to round all the values in both DataFrames to ZERO decimal places. You are calling these features_round and
response_round , respectively.
3. Computing the sum of every column for both features_round and response_round , and saving those values as features_final and
response_final
Finally, you are printing your final answer using the print() function.
Be sure to run all cells of your notebook prior to submitting, so that all output is rendered, visible and there are no error messages.
In [ ]:
features
In [ ]:
I response
In [ ]:
I features_round = np.around (features, decimals=0)
features_final = features_round.sum(axis=0)
print(features_final)
In [ ]: N response_round = np.around (response, decimals=0)
response_final = response_round.sum(axis=0)
print(response_final)](https://content.bartleby.com/qna-images/question/7ca3a2f1-af3a-43b5-a8da-2a619196371a/8c936b08-a2d7-4e22-91df-ff3951966d6e/onu64e9_thumbnail.png)
Transcribed Image Text:Prepare DataFrames for Grading
Do not make changes to the below code
After completing all data preparation tasks, run the following four cells to prepare your DataFrame for grading by:
1. Outputting the features and response DataFrames (you do not need to print).
2. Using the NumPy around() function to round all the values in both DataFrames to ZERO decimal places. You are calling these features_round and
response_round , respectively.
3. Computing the sum of every column for both features_round and response_round , and saving those values as features_final and
response_final
Finally, you are printing your final answer using the print() function.
Be sure to run all cells of your notebook prior to submitting, so that all output is rendered, visible and there are no error messages.
In [ ]:
features
In [ ]:
I response
In [ ]:
I features_round = np.around (features, decimals=0)
features_final = features_round.sum(axis=0)
print(features_final)
In [ ]: N response_round = np.around (response, decimals=0)
response_final = response_round.sum(axis=0)
print(response_final)
![DTSC670: Foundations of Machine Learning Models
Module 1
Assignment 2: COVID-19 Data Wrangling
Name:
The purpose of this assignment is to hone your data wrangling skills. Your task for this assignment is to perform the data preparation as instructed in the
DTSC670_Assignment_2 pdf listed in Brightspace. After performing all the data preparation tasks outlined in the document, run the code in the "Prepare
DataFrames for Grading" section.
You are supplied an Excel file called BrazilcOVIDData.xlsx - be sure to put the data file in the same directory as this Jupyter Notebook. Please note that it
may take around 5 minutes to read-in all of the data in this file.
In [ ]:
N ### ENTER CODE HERE ###
# Insert as many cells as you need, but be sure your code is very neat and very well documented.
In [ ]:
N # Get Final Features DataFrame
# features = ### ENTER CODE HERE ###
# Get Final Response DataFrame
# response = ### ENTER CODE HERE ###](https://content.bartleby.com/qna-images/question/7ca3a2f1-af3a-43b5-a8da-2a619196371a/8c936b08-a2d7-4e22-91df-ff3951966d6e/shecvej_thumbnail.png)
Transcribed Image Text:DTSC670: Foundations of Machine Learning Models
Module 1
Assignment 2: COVID-19 Data Wrangling
Name:
The purpose of this assignment is to hone your data wrangling skills. Your task for this assignment is to perform the data preparation as instructed in the
DTSC670_Assignment_2 pdf listed in Brightspace. After performing all the data preparation tasks outlined in the document, run the code in the "Prepare
DataFrames for Grading" section.
You are supplied an Excel file called BrazilcOVIDData.xlsx - be sure to put the data file in the same directory as this Jupyter Notebook. Please note that it
may take around 5 minutes to read-in all of the data in this file.
In [ ]:
N ### ENTER CODE HERE ###
# Insert as many cells as you need, but be sure your code is very neat and very well documented.
In [ ]:
N # Get Final Features DataFrame
# features = ### ENTER CODE HERE ###
# Get Final Response DataFrame
# response = ### ENTER CODE HERE ###
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Create a view named Refill_Due. It should consist of the patient id, dateofvisit, rxid, and the dosage for every medicine prescribed that requires refilling. Prefix the columns in the view with “RD”. For example, the PATIENTID in the table becomes RD_PATIENTID in the view. Use select statement to display the records from the view just created. See the output below and match your results to the sample output.arrow_forwardWhich of the following are insertion anomalies caused by redundancies in the following table? Inserting a new record without employee name (eName). Inserting a new employee who is not assigned to any hotel. Inserting a new record with NIN 1135 and eName John Smith. A) All three B) 1 and 2 C) 1 and 3 D) 2 and 3arrow_forwardDescribe the concept of Quality of Service (QoS) in WANs. How does QoS ensure the efficient use of network resources for critical applications?arrow_forward
- Task 6: The Car Maintenance team considered that the available maintenance tasks should also have the price information in the database. Alter the MAINTENANCE_TYPES table to include a new column named MAINTENANCE_PRICE of type FLOAT. ANSWER IN MYSQL PLEASEarrow_forwardData basearrow_forwardIn the Testa EV database described in the previous question, fill in the blanks in the following MySQL statement to list (in this order) all the part numbers of components of 'EV Dashboard' (with Part_No=1) and their quantities; sort the results in ascending order of quantity of components (i.e., components with small quantities are listed first). (Please ensure correctness in the spelling of all names and commands. Do not enter unnecessary symbols such as spaces or commas)arrow_forward
- Grade Roster Sort (file I/O) The file RosterScores.txt contains student test scores with comma-delimited data similar to what is shown in the screen snip below. Names, Scores Marie Curie, 89 Caroline Herschel, 70 Mary Anning, 93 Barbara McClintock, 99 Dorothy Hodkin, 85 My Solutions > Write a script that loads the data from this file into a table array variable named RosterScores and sorts the rows in order of the test scores running highest to lowest. Save the result in a new text file named RosterScores Sorted.txt.arrow_forwardI am working on Task 7. Task 7: Create a view named MONTHLY_RENTS. It consists of three columns: the first is the number of bedrooms, the second is the average square feet, and the third is the average monthly rent for all properties in the PROPERTY table that have that number of bedrooms. Use BEDROOMS, AVG_SQUARE_FEET, and AVG_MONTHLY_RENT as the column names. Group and order the rows by number of bedrooms. Here is Tasks 1-7 and what I wrote for Task 8. When I input Task 8, I am not getting results at all. Expected Results Tables_in_StayWell Table_type MONTHLY_RENTS VIEWarrow_forwardTask 2: StayWell is an active business and already has some data collected over e-mails and phone conversations. You need to insert the following data to the OWNER and PROPERTY tables: Add the provided information to the OWNER table. Add the provided information to the PROPERTY table.arrow_forward
- How well do you understand the differences between data definition, data manipulation and data control commands, and when to use each of these commands?arrow_forwardWhy is data validation important? Pick one of the data validation tips: How does this tip validate the input data? When and why would you use this tip?arrow_forwardWhat's "metadata"? Metadata in a dataset: Metadata from a result set—useful?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education