Answered step by step
Verified Expert Solution
Question
1 Approved Answer
means 14:55 in the afternoon. Create an Hour' variable that get the hour of the departure time, e.g. 1455 means the hour is 14. (Hint:
means 14:55 in the afternoon. Create an "Hour' variable that get the hour of the departure time, e.g. 1455 means the hour is 14. (Hint: what mathematical operation can help you get 14 from 1455?) (10 points) Based on the hour, create a new variable "time_of_day" as "day" and "night". You can have your own definition of day and night, e.g. 6-18 as day 19-5 as night. (10 points) Find the number of flights for each pair of DEST and ORIGIN. (Hint: groupby() to identify the unique pairs of DEST and ORIGIN and count records use any other variables). Which two airports have the most flights? (8 points) Change "Flight_Status" to dummies. Create a pivot table that gets the ontime rate based on "Weather" and "DAY OF_WEEK". "DAY_OF_WEEK" indicates which day of the week the flight is, e.g. 4 means Thursday. (Hint: refer to our titanic example.) (10 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started