Question: Using FlightTime.csv, write a Python program to perform the following. (1) Calculate the number of observations in your dataset. (2) Calculate the target flight time
Using FlightTime.csv, write a Python program to perform the following.
(1) Calculate the number of observations in your dataset.
(2) Calculate the target flight time with d = 1741.16 mi, lori = 87.90 and ldes = 118.41 . (
3) Calculate the typical time of this route. You will need to get the average of the departure and arrival delays and add it to the target flight time.
(4 Calculate the time added for each airline and determine which airline have the lowest time added. Note, you will need to calculate the average flight time for each airline.
(5) Output the results of your calculations to a text file.
Here is a sample of FlightTime.csv

FlightTime (1) Flight Date Carrier Flight Number Origin Destination Departure Time Departure Delay Arrival Time Arrival Delay Flight Time 11/1/2015 AA 111 ORD LAX 1709 -1 1952 2 283 11/1/2015 1092 ORD LAX 2021 -4 2243 -20 262 11/1/2015 1081 ORD LAX 841 -4 1052 -33 251 11/1/2015 1243 ORD LAX 705 -5 919 -31 254 11/1/2015 1358 ORD LAX 1508 -2 1739 -10 271 11/1/2015 1571 ORD LAX 1002 12 1224 1 262 11/1/2015 2220 ORD LAX 1232 12 1456 -6 264 3 3 3 3 3 3 11/1/2015 2223 ORD LAX 1358 -2 1623 -17 265 11/1/2015 2225 ORD LAX 1905 40 2116 13 251 11/1/2015 2279 ORD LAX 2209 -1 44 -4 275 11/1/2015 F9 1271 ORD LAX 2101 -4 2326 -4 265 11/1/2015 NK 731 ORD LAX 1641 1 1857 -3 256 11/1/2015 NK 737 ORD LAX 713 13 1009 29 296 11/1/2015 UA 204 ORD LAX 729 -3 959 -27 270 11/1/2015 UA 1489 ORD LAX 2324 2 143 -26 259 11/1/2015 UA 1595 ORD LAX 1605 -2 1827 -16 262 11/1/2015 UA 310 ORD LAX 1348 4 1636 18 288 11/1/2015 UA 378 ORD LAX 2059 -6 2320 -23 261 11/1/2015 UA 411 ORD LAX 1915 5 2137 -8 262 11/1/2015 UA 531 ORD LAX 1119 -6 1334 -31 255 11/1/2015 UA 2001 ORD LAX 905 0 1127 -18 262 11/1/2015 VX 231 ORD LAX 1034 4 1253 -12 259 11/1/2015 VX 241 ORD LAX 1700 0 1922 -8 262 11/2/2015 111 ORD LAX 1713 3 1939 -11 266 11/2/2015 1092 ORD LAX 2034 9 2244 -19 250 11/2/2015 1081 ORD LAX 854 9 1123 -2 269 11/2/2015 1243 ORD LAX 707 -3 931 -19 264 11/2/2015 1358 ORD LAX 1504 -6 1728 -21 264 11/2/2015 AA 1571 ORD LAX 948 -2 1215 -8 267 11/2/2015 2220 ORD LAX 1217 -3 1445 -17 268 FlightTime (1) Flight Date Carrier Flight Number Origin Destination Departure Time Departure Delay Arrival Time Arrival Delay Flight Time 11/1/2015 AA 111 ORD LAX 1709 -1 1952 2 283 11/1/2015 1092 ORD LAX 2021 -4 2243 -20 262 11/1/2015 1081 ORD LAX 841 -4 1052 -33 251 11/1/2015 1243 ORD LAX 705 -5 919 -31 254 11/1/2015 1358 ORD LAX 1508 -2 1739 -10 271 11/1/2015 1571 ORD LAX 1002 12 1224 1 262 11/1/2015 2220 ORD LAX 1232 12 1456 -6 264 3 3 3 3 3 3 11/1/2015 2223 ORD LAX 1358 -2 1623 -17 265 11/1/2015 2225 ORD LAX 1905 40 2116 13 251 11/1/2015 2279 ORD LAX 2209 -1 44 -4 275 11/1/2015 F9 1271 ORD LAX 2101 -4 2326 -4 265 11/1/2015 NK 731 ORD LAX 1641 1 1857 -3 256 11/1/2015 NK 737 ORD LAX 713 13 1009 29 296 11/1/2015 UA 204 ORD LAX 729 -3 959 -27 270 11/1/2015 UA 1489 ORD LAX 2324 2 143 -26 259 11/1/2015 UA 1595 ORD LAX 1605 -2 1827 -16 262 11/1/2015 UA 310 ORD LAX 1348 4 1636 18 288 11/1/2015 UA 378 ORD LAX 2059 -6 2320 -23 261 11/1/2015 UA 411 ORD LAX 1915 5 2137 -8 262 11/1/2015 UA 531 ORD LAX 1119 -6 1334 -31 255 11/1/2015 UA 2001 ORD LAX 905 0 1127 -18 262 11/1/2015 VX 231 ORD LAX 1034 4 1253 -12 259 11/1/2015 VX 241 ORD LAX 1700 0 1922 -8 262 11/2/2015 111 ORD LAX 1713 3 1939 -11 266 11/2/2015 1092 ORD LAX 2034 9 2244 -19 250 11/2/2015 1081 ORD LAX 854 9 1123 -2 269 11/2/2015 1243 ORD LAX 707 -3 931 -19 264 11/2/2015 1358 ORD LAX 1504 -6 1728 -21 264 11/2/2015 AA 1571 ORD LAX 948 -2 1215 -8 267 11/2/2015 2220 ORD LAX 1217 -3 1445 -17 268
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
