Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this question, perform the following: remove rows with missing values keep flights departing from airports ( ORIGIN _ AIRPORT ) that we want to
For this question, perform the following:
remove rows with missing values
keep flights departing from airports ORIGINAIRPORT that we want to look at BOS JFK SFO and LAX
filter out the flights that have more than day delay DEPARTUREDELAY
convert FLIGHTNUMBER column type to string
SCHEDULEDDEPARTURE is coded as a float where the first two digits indicate the hour and the last two indicate the minutes. Convert this column to datetime format by combining existing columns DAY, MONTH, YEAR and SCHEDULEDDEPARTURE
add ISDELAYED column by considering any flight with at least minutes delay DEPARTUREDELAY are delayed, and any other flight is not delayed
remove YEAR, MONTH, DAY columns
: def datapreprocessflightsdf:
# YOUR CODE HERE
raise NotImplementedError
return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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