Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USLOO EUROPE er Data_Shaping_Assignment(1) (5) (autosaved) View Insert Cell Kernel Widgets Help B 1 Al Run IC Code va Not Trusted Pyth 1) Read study_hours.csv

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
USLOO EUROPE er Data_Shaping_Assignment(1) (5) (autosaved) View Insert Cell Kernel Widgets Help B 1 Al Run IC Code va Not Trusted Pyth 1) Read study_hours.csv" into a data frame named study_hours and preform the following 1. Use function melt to reshape columns "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", and "Sun" into columns "Day", containing day of the week, and "Hours", containing the number of hours studied on that day. Name the resulting data frame study_hours_reshaped. Hint: when calling melt, specify key as "Day", and value as "Hours". 2. Print the top 5 observation and print dimensions of study_hours_reshaped using function shape attribute Hint: it should have 42 rows and 5 columns. Output: study_hours_reshaped.head() Name Alice Year Major Day Hours freshman CS Mon O arch Programmer Name: Class: CIS4321.2, Spring 2020 # Programming Assignment Date: # Description: 1) Read "study_hours.csv" into a data frame named study_hours and preform the following 1. Use function melt to reshape columns "Mon'. Tue" "Wed", "Thu", "Fri", "Sat", and "Sun" into columns "Day containing day of the week, and Hours" containing the number of hours studied on that day. Name the resulting data frame study_hours_reshaped. Hint when calling melt, specify key as Day, and value as "Hours" 2. Print the top 5 observation and print dimensions of study_hours reshaped using function shape attribute Hint: it should have 42 rows and 5 columns Output study_hours_reshaped.head') Year Major Day Hours CS MATH on 1) Read "study_hours.csv" into a data frame named study_hours and preform the following 1. Use function melt to reshape columns "Mon", "Tue", "Wed", "Thu","Fri", "Sat", and "Sun" into columns "Day containing day of the week, and "Hours", containing the number of hours studied on that day. Name the resulting data frame study_hours_reshaped. Hint: when calling melt, specify key as "Day, and value as "Hours". 2. Print the top 5 observation and print dimensions of study hours reshaped using function shape attribute Hint: it should have 42 rows and 5 columns Output: study_hours_reshaped.head() Name Year Major Day Hours Alice freshman CS Mon Bob senior MATH Mon Carol sophomore cs Mon David junior ECON Mon 4 Emly freshman MATH Mon ront Alignment for Name D Mon Tue Wed 1 Name 2 Alice 3 Bob 4 Carol 5 David 6 Emily 7 Fred Year Major freshman CS senior MATH sophomor CS junior ECON freshman MATH senior EE ow CO

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

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions

Question

i need correct answrrs 4 6 2 .

Answered: 1 week ago

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago