I need help on what code is used to complete these problems. There are 3 problems I need to complete using Python code. The screenshots of the 3 problems are attached as well as the corresponding Excel data sets.
CRS_DEP_TIME,CARRIER,DEP_TIME,DEST,DISTANCE,FL_DATE,FL_NUM,ORIGIN,Weather,DAY_WEEK,DAY_OF_MONTH,TAIL_NUM,Flight Status 1455,OH,1455,JFK,184,01/01/2004,5935,BWI,0,4,1,N940CA,ontime 1640,DH,1640,JFK,213,01/01/2004,6155,DCA,0,4,1,N405FJ,ontime 1245,DH,1245,LGA,229,01/01/2004,7208,IAD,0,4,1,N695BR,ontime 1715,DH,1709,LGA,229,01/01/2004,7215,IAD,0,4,1,N662BR,ontime 1039,DH,1035,LGA,229,01/01/2004,7792,IAD,0,4,1,N698BR,ontime 840,DH,839,JFK,228,01/01/2004,7800,IAD,0,4,1,N687BR,ontime 1240,DH,1243,JFK,228,01/01/2004,7806,IAD,0,4,1,N321UE,ontime 1645,DH,1644,JFK,228,01/01/2004,7810,IAD,0,4,1,N301UE,ontime 1715,DH,1710,JFK,228,01/01/2004,7812,IAD,0,4,1,N328UE,ontime 2120,DH,2129,JFK,228,01/01/2004,7814,IAD,0,4,1,N685BR,ontime 2120,DH,2114,LGA,229,01/01/2004,7924,IAD,0,4,1,N645BR,ontime 1455,DL,1458,JFK,213,01/01/2004,746,DCA,0,4,1,N918DE,ontime 930,DL,932,LGA,214,01/01/2004,1746,DCA,0,4,1,N242DL,ontime 1230,DL,1228,LGA,214,01/01/2004,1752,DCA,0,4,1,N241DL,ontime 1430,DL,1429,LGA,214,01/01/2004,1756,DCA,0,4,1,N242DL,ontime 1730,DL,1728,LGA,214,01/01/2004,1762,DCA,0,4,1,N241DL,ontime 2030,DL,2029,LGA,214,01/01/2004,1768,DCA,0,4,1,N242DL,ontime 1530,MQ,1525,JFK,213,01/01/2004,4752,DCA,0,4,1,N709MQ,ontime 600,MQ,556,JFK,213,01/01/2004,4760,DCA,0,4,1,N717MQ,ontime 1830,MQ,1822,JFK,213,01/01/2004,4784,DCA,0,4,1,N707MQ,ontime 900,MQ,853,LGA,214,01/01/2004,4956,DCA,0,4,1,N737MQ,ontime 1300,MQ,1254,LGA,214,01/01/2004,4964,DCA,0,4,1,N717MQ,ontime 1400,MQ,1356,LGA,214,01/01/2004,4966,DCA,0,4,1,N726MQ,ontime 1500,MQ,1452,LGA,214,01/01/2004,4968,DCA,0,4,1,N724MQ,ontime 1900,MQ,1853,LGA,214,01/01/2004,4976,DCA,0,4,1,N724MQ,ontime 850,UA,841,LGA,229,01/01/2004,846,IAD,0,4,1,N513UA,ontime 900,US,858,LGA,214,01/01/2004,2164,DCA,0,4,1,N709UW,ontime 1100,US,1056,LGA,214,01/01/2004,2168,DCA,0,4,1,N748UW,ontime 1300,US,1253,LGA,214,01/01/2004,2172,DCA,0,4,1,N709UW,ontime 1500,US,1458,LGA,214,01/01/2004,2176,DCA,0,4,1,N748UW,ontime 1700,US,1655,LGA,214,01/01/2004,2180,DCA,0,4,1,N709UW,ontime 2100,US,2055,LGA,214,01/01/2004,2188,DCA,0,4,1,N709UW,ontime 1455,RU,1452,EWR,169,01/01/2004,2403,BWI,0,4,1,N14916,ontime 1720,RU,1710,EWR,169,01/01/2004,2675,BWI,0,4,1,N16954,ontime 1030,RU,1030,EWR,169,01/01/2004,2303,BWI,0,4,1,N26549,ontime 700,RU,656,EWR,169,01/01/2004,2703,BWI,0,4,1,N16954,ontime 1300,CO,1256,EWR,199,01/01/2004,808,DCA,0,4,1,N18611,ontime 1730,CO,1726,EWR,199,01/01/2004,814,DCA,0,4,1,N19357,ontime 840,DH,840,EWR,213,01/01/2004,7299,IAD,0,4,1,N691BR,ontime 1710,DH,1704,EWR,213,01/01/2004,7302,IAD,0,4,1,N691BR,ontime 1245,DH,1245,EWR,213,01/01/2004,7303,IAD,0,4,1,N697BR,ontime 2120,DH,2118,EWR,213,01/01/2004,7304,IAD,0,4,1,N699BR,ontime 1700,RU,1651,EWR,213,01/01/2004,2497,IAD,0,4,1,N12540,ontime 1900,RU,1850,EWR,213,01/01/2004,2385,IAD,0,4,1,N16149,ontime 1525,RU,1521,EWR,199,01/01/2004,2261,DCA,0,4,1,N12564,ontime 1900,RU,1855,EWR,199,01/01/2004,2336,DCA,0,4,1,N21537,ontime 1400,RU,1357,EWR,199,01/01/2004,2216,DCA,0,4,1,N15983,ontime 1515,RU,1508,EWR,213,01/01/2004,2156,IAD,0,4,1,N16149,ontime 1300,RU,1255,EWR,213,01/01/2004,2664,IAD,0,4,1,N12519,ontime 1630,RU,1625,EWR,199,01/01/2004,2181,DCA,0,4,1,N19966,ontime 1455,OH,1455,JFK,184,01/02/2004,5935,BWI,0,5,2,N995CA,ontime 1640,DH,1641,JFK,213,01/02/2004,6155,DCA,0,5,2,N415FJ,ontime 1245,DH,1249,LGA,229,01/02/2004,7208,IAD,0,5,2,N688BR,ontime 1455,DH,1531,LGA,229,01/02/2004,7211,IAD,0,5,2,N665BR,delayed 1715,DH,1712,LGA,229,01/02/2004,7215,IAD,0,5,2,N639BR,ontime 640,DH,645,LGA,229,01/02/2004,7790,IAD,0,5,2,N686BR,ontime 1039,DH,1236,LGA,229,01/02/2004,7792,IAD,0,5,2,N665BR,delayed 840,DH,859,JFK,228,01/02/2004,7800,IAD,0,5,2,N645BR,ontime 1240,DH,1232,JFK,228,01/02/2004,7806,IAD,0,5,2,N332UE,ontime 1455,DH,1455,JFK,228,01/02/2004,7808,IAD,0,5,2,N324UE,ontime 1645,DH,1645,JFK,228,01/02/2004,7810,IAD,0,5,2,N305UE,ontime 1715,DH,1716,JFK,228,01/02/2004,7812,IAD,0,5,2,N322UE,ontime 2120,DH,2305,JFK,228,01/02/2004,7814,IAD,0,5,2,N657BR,delayed 1610,DH,1605,JFK,228,01/02/2004,7816,IAD,0,5,2,N315UE,ontime 2120,DH,2118,LGA,229,01/02/2004,7924,IAD,0,5,2,N709BR,ontime 1455,DL,1458,JFK,213,01/02/2004,746,DCA,0,5,2,N964DL,ontime 930,DL,930,LGA,214,01/02/2004,1746,DCA,0,5,2,N241DL,ontime 1230,DL,1230,LGA,214,01/02/2004,1752,DCA,0,5,2,N225DL,ontime 1430,DL,1427,LGA,214,01/02/2004,1756,DCA,0,5,2,N241DL,ontime 1730,DL,1730,LGA,214,01/02/2004,1762,DCA,0,5,2,N225DL,ontime 2030,DL,2028,LGA,214,01/02/2004,1768,DCA,0,5,2,N241DL,ontime 1530,MQ,1522,JFK,213,01/02/2004,4752,DCA,0,5,2,N720MQ,ontime 600,MQ,552,JFK,213,01/02/2004,4760,DCA,0,5,2,N736MQ,ontime 1830,MQ,1847,JFK,213,01/02/2004,4784,DCA,0,5,2,N727MQ,ontime 900,MQ,852,LGA,214,01/02/2004,4956,DCA,0,5,2,N713MQ,ontime 1100,MQ,1053,LGA,214,01/02/2004,4960,DCA,0,5,2,N708MQ,ontime 1300,MQ,1258,LGA,214,01/02/2004,4964,DCA,0,5,2,N713MQ,ontime 1400,MQ,1402,LGA,214,01/02/2004,4966,DCA,0,5,2,N718MQ,ontime 1500,MQ,1456,LGA,214,01/02/2004,4968,DCA,0,5,2,N708MQ,ontime 850,UA,850,LGA,229,01/02/2004,846,IAD,0,5,2,N556UA,ontime 700,US,657,LGA,214,01/02/2004,2160,DCA,0,5,2,N710UW,ontime 900,US,857,LGA,214,01/02/2004,2164,DCA,0,5,2,N736UW,ontime 1100,US,1058,LGA,214,01/02/2004,2168,DCA,0,5,2,N710UW,ontime 1300,US,1258,LGA,214,01/02/2004,2172,DCA,0,5,2,N736UW,ontime 1500,US,1458,LGA,214,01/02/2004,2176,DCA,0,5,2,N710UW,ontime 1700,US,1655,LGA,214,01/02/2004,2180,DCA,0,5,2,N736UW,ontime 1900,US,1855,LGA,214,01/02/2004,2184,DCA,0,5,2,N710UW,ontime 2100,US,2056,LGA,214,01/02/2004,2188,DCA,0,5,2,N736UW,ontime 1720,RU,1715,EWR,169,01/02/2004,2675,BWI,0,5,2,N19966,ontime 1030,RU,1030,EWR,169,01/02/2004,2303,BWI,0,5,2,N12540,ontime 700,RU,656,EWR,169,01/02/2004,2703,BWI,0,5,2,N16961,ontime 1455,RU,1456,EWR,169,01/02/2004,2403,BWI,0,5,2,N12946,ontime 1730,CO,1727,EWR,199,01/02/2004,814,DCA,0,5,2,N14342,ontime 1300,CO,1301,EWR,199,01/02/2004,808,DCA,0,5,2,N14664,ontime 759,CO,754,EWR,199,01/02/2004,806,DCA,0,5,2,N11641,ontime 840,DH,837,EWR,213,01/02/2004,7299,IAD,0,5,2,N679BR,ontime 1245,DH,1350,EWR,213,01/02/2004,7303,IAD,0,5,2,N686BR,delayed 1430,DH,1512,EWR,213,01/02/2004,7307,IAD,0,5,2,N309UE,delayed 630,DH,629,EWR,213,01/02/2004,7371,IAD,0,5,2,N312UE,ontime 1630,RU,1625,EWR,199,01/02/2004,2181,DCA,0,5,2,N14977,ontime 700,RU,655,EWR,213,01/02/2004,2855,IAD,0,5,2,N13990,ontime 900,RU,858,EWR,199,01/02/2004,2582,DCA,0,5,2,N14907,ontime 700,RU,657,EWR,199,01/02/2004,2761,DCA,0,5,2,N13997,ontime 1700,RU,1650,EWR,213,01/02/2004,2497,IAD,0,5,2,N12528,ontime 1900,RU,1856,EWR,213,01/02/2004,2385,IAD,0,5,2,N11107,ontime 1300,RU,1253,EWR,213,01/02/2004,2692,IAD,0,5,2,N14505,ontime 900,RU,854,EWR,213,01/02/2004,3276,IAD,0,5,2,N16151,ontime 1900,RU,1858,EWR,199,01/02/2004,2336,DCA,0,5,2,N15985,ontime 2100,RU,2050,EWR,199,01/02/2004,2879,DCA,0,5,2,N17108,ontime 1400,RU,1358,EWR,199,01/02/2004,2216,DCA,0,5,2,N13118,ontime 1515,RU,1510,EWR,213,01/02/2004,2156,IAD,0,5,2,N11107,delayed 1525,RU,1519,EWR,199,01/02/2004,2261,DCA,0,5,2,N15574,ontime 1245,DH,1243,LGA,229,01/03/2004,7208,IAD,0,6,3,N688BR,ontime 1715,DH,1738,LGA,229,01/03/2004,7215,IAD,0,6,3,N639BR,ontime 640,DH,640,LGA,229,01/03/2004,7790,IAD,0,6,3,N696BR,ontime 1039,DH,1030,LGA,229,01/03/2004,7792,IAD,0,6,3,N696BR,ontime 840,DH,855,JFK,228,01/03/2004,7800,IAD,0,6,3,N709BR,ontime 1240,DH,1237,JFK,228,01/03/2004,7806,IAD,0,6,3,N327UE,ontime 1455,DH,1455,JFK,228,01/03/2004,7808,IAD,0,6,3,N309UE,ontime 1645,DH,1654,JFK,228,01/03/2004,7810,IAD,0,6,3,N311UE,ontime 1715,DH,1741,JFK,228,01/03/2004,7812,IAD,0,6,3,N327UE,ontime 2120,DH,2213,JFK,228,01/03/2004,7814,IAD,0,6,3,N655BR,delayed 1610,DH,1604,JFK,228,01/03/2004,7816,IAD,0,6,3,N329UE,ontime 2120,DH,2138,LGA,229,01/03/2004,7924,IAD,0,6,3,N688BR,ontime 1455,DL,1505,JFK,213,01/03/2004,746,DCA,0,6,3,N997DL,delayed 830,DL,828,LGA,214,01/03/2004,1744,DCA,0,6,3,N225DL,ontime 1030,DL,1030,LGA,214,01/03/2004,1748,DCA,0,6,3,N242DL,ontime 1230,DL,1230,LGA,214,01/03/2004,1752,DCA,0,6,3,N225DL,ontime 1430,DL,1428,LGA,214,01/03/2004,1756,DCA,0,6,3,N242DL,ontime 1630,DL,1629,LGA,214,01/03/2004,1760,DCA,0,6,3,N225DL,ontime 1830,DL,1829,LGA,214,01/03/2004,1764,DCA,0,6,3,N242DL,ontime 2030,DL,2024,LGA,214,01/03/2004,1768,DCA,0,6,3,N225DL,ontime 1530,MQ,1600,JFK,213,01/03/2004,4752,DCA,0,6,3,N734MQ,delayed 600,MQ,555,JFK,213,01/03/2004,4760,DCA,0,6,3,N712MQ,ontime 1830,MQ,1829,JFK,213,01/03/2004,4784,DCA,0,6,3,N709MQ,ontime 900,MQ,855,LGA,214,01/03/2004,4956,DCA,0,6,3,N739MQ,ontime 1300,MQ,1254,LGA,214,01/03/2004,4964,DCA,0,6,3,N739MQ,ontime 850,UA,849,LGA,229,01/03/2004,846,IAD,0,6,3,N567UA,ontime 700,US,655,LGA,214,01/03/2004,2160,DCA,0,6,3,N760UW,ontime 900,US,858,LGA,214,01/03/2004,2164,DCA,0,6,3,N710UW,ontime 1100,US,1059,LGA,214,01/03/2004,2168,DCA,0,6,3,N760UW,ontime 1300,US,1256,LGA,214,01/03/2004,2172,DCA,0,6,3,N710UW,ontime 1500,US,1500,LGA,214,01/03/2004,2176,DCA,0,6,3,N760UW,ontime 1700,US,1658,LGA,214,01/03/2004,2180,DCA,0,6,3,N710UW,ontime 1900,US,1857,LGA,214,01/03/2004,2184,DCA,0,6,3,N760UW,ontime 1720,RU,1714,EWR,169,01/03/2004,2675,BWI,0,6,3,N15574,ontime 700,RU,655,EWR,169,01/03/2004,2703,BWI,0,6,3,N11536,ontime 1030,RU,1026,EWR,169,01/03/2004,2303,BWI,0,6,3,N14907,ontime 1455,RU,1448,EWR,169,01/03/2004,2267,BWI,0,6,3,N14974,ontime 1300,CO,1255,EWR,199,01/03/2004,808,DCA,0,6,3,N11612,ontime 840,DH,857,EWR,213,01/03/2004,7299,IAD,0,6,3,N693BR,delayed 1710,DH,1705,EWR,213,01/03/2004,7302,IAD,0,6,3,N693BR,ontime 1245,DH,1329,EWR,213,01/03/2004,7303,IAD,0,6