Delete tools/flights/test2.ipynb
Browse files- tools/flights/test2.ipynb +0 -923
tools/flights/test2.ipynb
DELETED
|
@@ -1,923 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"cells": [
|
| 3 |
-
{
|
| 4 |
-
"cell_type": "code",
|
| 5 |
-
"execution_count": 3,
|
| 6 |
-
"id": "a10c60c4",
|
| 7 |
-
"metadata": {},
|
| 8 |
-
"outputs": [],
|
| 9 |
-
"source": [
|
| 10 |
-
"import pandas as pd\n",
|
| 11 |
-
"data = pd.read_csv('/home/xj/toolAugEnv/code/toolConstraint/database/flights/Combined_Flights_2022.csv')"
|
| 12 |
-
]
|
| 13 |
-
},
|
| 14 |
-
{
|
| 15 |
-
"cell_type": "code",
|
| 16 |
-
"execution_count": 17,
|
| 17 |
-
"id": "1c12a0f0",
|
| 18 |
-
"metadata": {},
|
| 19 |
-
"outputs": [
|
| 20 |
-
{
|
| 21 |
-
"data": {
|
| 22 |
-
"text/html": [
|
| 23 |
-
"<div>\n",
|
| 24 |
-
"<style scoped>\n",
|
| 25 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 26 |
-
" vertical-align: middle;\n",
|
| 27 |
-
" }\n",
|
| 28 |
-
"\n",
|
| 29 |
-
" .dataframe tbody tr th {\n",
|
| 30 |
-
" vertical-align: top;\n",
|
| 31 |
-
" }\n",
|
| 32 |
-
"\n",
|
| 33 |
-
" .dataframe thead th {\n",
|
| 34 |
-
" text-align: right;\n",
|
| 35 |
-
" }\n",
|
| 36 |
-
"</style>\n",
|
| 37 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 38 |
-
" <thead>\n",
|
| 39 |
-
" <tr style=\"text-align: right;\">\n",
|
| 40 |
-
" <th></th>\n",
|
| 41 |
-
" <th>FlightDate</th>\n",
|
| 42 |
-
" <th>Airline</th>\n",
|
| 43 |
-
" <th>Origin</th>\n",
|
| 44 |
-
" <th>Dest</th>\n",
|
| 45 |
-
" <th>Cancelled</th>\n",
|
| 46 |
-
" <th>Diverted</th>\n",
|
| 47 |
-
" <th>CRSDepTime</th>\n",
|
| 48 |
-
" <th>DepTime</th>\n",
|
| 49 |
-
" <th>DepDelayMinutes</th>\n",
|
| 50 |
-
" <th>DepDelay</th>\n",
|
| 51 |
-
" <th>...</th>\n",
|
| 52 |
-
" <th>WheelsOff</th>\n",
|
| 53 |
-
" <th>WheelsOn</th>\n",
|
| 54 |
-
" <th>TaxiIn</th>\n",
|
| 55 |
-
" <th>CRSArrTime</th>\n",
|
| 56 |
-
" <th>ArrDelay</th>\n",
|
| 57 |
-
" <th>ArrDel15</th>\n",
|
| 58 |
-
" <th>ArrivalDelayGroups</th>\n",
|
| 59 |
-
" <th>ArrTimeBlk</th>\n",
|
| 60 |
-
" <th>DistanceGroup</th>\n",
|
| 61 |
-
" <th>DivAirportLandings</th>\n",
|
| 62 |
-
" </tr>\n",
|
| 63 |
-
" </thead>\n",
|
| 64 |
-
" <tbody>\n",
|
| 65 |
-
" <tr>\n",
|
| 66 |
-
" <th>0</th>\n",
|
| 67 |
-
" <td>2022-04-04</td>\n",
|
| 68 |
-
" <td>Commutair Aka Champlain Enterprises, Inc.</td>\n",
|
| 69 |
-
" <td>GJT</td>\n",
|
| 70 |
-
" <td>DEN</td>\n",
|
| 71 |
-
" <td>False</td>\n",
|
| 72 |
-
" <td>False</td>\n",
|
| 73 |
-
" <td>1133</td>\n",
|
| 74 |
-
" <td>1123.0</td>\n",
|
| 75 |
-
" <td>0.0</td>\n",
|
| 76 |
-
" <td>-10.0</td>\n",
|
| 77 |
-
" <td>...</td>\n",
|
| 78 |
-
" <td>1140.0</td>\n",
|
| 79 |
-
" <td>1220.0</td>\n",
|
| 80 |
-
" <td>8.0</td>\n",
|
| 81 |
-
" <td>1245</td>\n",
|
| 82 |
-
" <td>-17.0</td>\n",
|
| 83 |
-
" <td>0.0</td>\n",
|
| 84 |
-
" <td>-2.0</td>\n",
|
| 85 |
-
" <td>1200-1259</td>\n",
|
| 86 |
-
" <td>1</td>\n",
|
| 87 |
-
" <td>0</td>\n",
|
| 88 |
-
" </tr>\n",
|
| 89 |
-
" <tr>\n",
|
| 90 |
-
" <th>1</th>\n",
|
| 91 |
-
" <td>2022-04-04</td>\n",
|
| 92 |
-
" <td>Commutair Aka Champlain Enterprises, Inc.</td>\n",
|
| 93 |
-
" <td>HRL</td>\n",
|
| 94 |
-
" <td>IAH</td>\n",
|
| 95 |
-
" <td>False</td>\n",
|
| 96 |
-
" <td>False</td>\n",
|
| 97 |
-
" <td>732</td>\n",
|
| 98 |
-
" <td>728.0</td>\n",
|
| 99 |
-
" <td>0.0</td>\n",
|
| 100 |
-
" <td>-4.0</td>\n",
|
| 101 |
-
" <td>...</td>\n",
|
| 102 |
-
" <td>744.0</td>\n",
|
| 103 |
-
" <td>839.0</td>\n",
|
| 104 |
-
" <td>9.0</td>\n",
|
| 105 |
-
" <td>849</td>\n",
|
| 106 |
-
" <td>-1.0</td>\n",
|
| 107 |
-
" <td>0.0</td>\n",
|
| 108 |
-
" <td>-1.0</td>\n",
|
| 109 |
-
" <td>0800-0859</td>\n",
|
| 110 |
-
" <td>2</td>\n",
|
| 111 |
-
" <td>0</td>\n",
|
| 112 |
-
" </tr>\n",
|
| 113 |
-
" <tr>\n",
|
| 114 |
-
" <th>2</th>\n",
|
| 115 |
-
" <td>2022-04-04</td>\n",
|
| 116 |
-
" <td>Commutair Aka Champlain Enterprises, Inc.</td>\n",
|
| 117 |
-
" <td>DRO</td>\n",
|
| 118 |
-
" <td>DEN</td>\n",
|
| 119 |
-
" <td>False</td>\n",
|
| 120 |
-
" <td>False</td>\n",
|
| 121 |
-
" <td>1529</td>\n",
|
| 122 |
-
" <td>1514.0</td>\n",
|
| 123 |
-
" <td>0.0</td>\n",
|
| 124 |
-
" <td>-15.0</td>\n",
|
| 125 |
-
" <td>...</td>\n",
|
| 126 |
-
" <td>1535.0</td>\n",
|
| 127 |
-
" <td>1622.0</td>\n",
|
| 128 |
-
" <td>14.0</td>\n",
|
| 129 |
-
" <td>1639</td>\n",
|
| 130 |
-
" <td>-3.0</td>\n",
|
| 131 |
-
" <td>0.0</td>\n",
|
| 132 |
-
" <td>-1.0</td>\n",
|
| 133 |
-
" <td>1600-1659</td>\n",
|
| 134 |
-
" <td>2</td>\n",
|
| 135 |
-
" <td>0</td>\n",
|
| 136 |
-
" </tr>\n",
|
| 137 |
-
" <tr>\n",
|
| 138 |
-
" <th>3</th>\n",
|
| 139 |
-
" <td>2022-04-04</td>\n",
|
| 140 |
-
" <td>Commutair Aka Champlain Enterprises, Inc.</td>\n",
|
| 141 |
-
" <td>IAH</td>\n",
|
| 142 |
-
" <td>GPT</td>\n",
|
| 143 |
-
" <td>False</td>\n",
|
| 144 |
-
" <td>False</td>\n",
|
| 145 |
-
" <td>1435</td>\n",
|
| 146 |
-
" <td>1430.0</td>\n",
|
| 147 |
-
" <td>0.0</td>\n",
|
| 148 |
-
" <td>-5.0</td>\n",
|
| 149 |
-
" <td>...</td>\n",
|
| 150 |
-
" <td>1446.0</td>\n",
|
| 151 |
-
" <td>1543.0</td>\n",
|
| 152 |
-
" <td>4.0</td>\n",
|
| 153 |
-
" <td>1605</td>\n",
|
| 154 |
-
" <td>-18.0</td>\n",
|
| 155 |
-
" <td>0.0</td>\n",
|
| 156 |
-
" <td>-2.0</td>\n",
|
| 157 |
-
" <td>1600-1659</td>\n",
|
| 158 |
-
" <td>2</td>\n",
|
| 159 |
-
" <td>0</td>\n",
|
| 160 |
-
" </tr>\n",
|
| 161 |
-
" <tr>\n",
|
| 162 |
-
" <th>4</th>\n",
|
| 163 |
-
" <td>2022-04-04</td>\n",
|
| 164 |
-
" <td>Commutair Aka Champlain Enterprises, Inc.</td>\n",
|
| 165 |
-
" <td>DRO</td>\n",
|
| 166 |
-
" <td>DEN</td>\n",
|
| 167 |
-
" <td>False</td>\n",
|
| 168 |
-
" <td>False</td>\n",
|
| 169 |
-
" <td>1135</td>\n",
|
| 170 |
-
" <td>1135.0</td>\n",
|
| 171 |
-
" <td>0.0</td>\n",
|
| 172 |
-
" <td>0.0</td>\n",
|
| 173 |
-
" <td>...</td>\n",
|
| 174 |
-
" <td>1154.0</td>\n",
|
| 175 |
-
" <td>1243.0</td>\n",
|
| 176 |
-
" <td>8.0</td>\n",
|
| 177 |
-
" <td>1245</td>\n",
|
| 178 |
-
" <td>6.0</td>\n",
|
| 179 |
-
" <td>0.0</td>\n",
|
| 180 |
-
" <td>0.0</td>\n",
|
| 181 |
-
" <td>1200-1259</td>\n",
|
| 182 |
-
" <td>2</td>\n",
|
| 183 |
-
" <td>0</td>\n",
|
| 184 |
-
" </tr>\n",
|
| 185 |
-
" <tr>\n",
|
| 186 |
-
" <th>...</th>\n",
|
| 187 |
-
" <td>...</td>\n",
|
| 188 |
-
" <td>...</td>\n",
|
| 189 |
-
" <td>...</td>\n",
|
| 190 |
-
" <td>...</td>\n",
|
| 191 |
-
" <td>...</td>\n",
|
| 192 |
-
" <td>...</td>\n",
|
| 193 |
-
" <td>...</td>\n",
|
| 194 |
-
" <td>...</td>\n",
|
| 195 |
-
" <td>...</td>\n",
|
| 196 |
-
" <td>...</td>\n",
|
| 197 |
-
" <td>...</td>\n",
|
| 198 |
-
" <td>...</td>\n",
|
| 199 |
-
" <td>...</td>\n",
|
| 200 |
-
" <td>...</td>\n",
|
| 201 |
-
" <td>...</td>\n",
|
| 202 |
-
" <td>...</td>\n",
|
| 203 |
-
" <td>...</td>\n",
|
| 204 |
-
" <td>...</td>\n",
|
| 205 |
-
" <td>...</td>\n",
|
| 206 |
-
" <td>...</td>\n",
|
| 207 |
-
" <td>...</td>\n",
|
| 208 |
-
" </tr>\n",
|
| 209 |
-
" <tr>\n",
|
| 210 |
-
" <th>4078313</th>\n",
|
| 211 |
-
" <td>2022-03-31</td>\n",
|
| 212 |
-
" <td>Republic Airlines</td>\n",
|
| 213 |
-
" <td>MSY</td>\n",
|
| 214 |
-
" <td>EWR</td>\n",
|
| 215 |
-
" <td>False</td>\n",
|
| 216 |
-
" <td>True</td>\n",
|
| 217 |
-
" <td>1949</td>\n",
|
| 218 |
-
" <td>2014.0</td>\n",
|
| 219 |
-
" <td>25.0</td>\n",
|
| 220 |
-
" <td>25.0</td>\n",
|
| 221 |
-
" <td>...</td>\n",
|
| 222 |
-
" <td>2031.0</td>\n",
|
| 223 |
-
" <td>202.0</td>\n",
|
| 224 |
-
" <td>32.0</td>\n",
|
| 225 |
-
" <td>2354</td>\n",
|
| 226 |
-
" <td>NaN</td>\n",
|
| 227 |
-
" <td>NaN</td>\n",
|
| 228 |
-
" <td>NaN</td>\n",
|
| 229 |
-
" <td>2300-2359</td>\n",
|
| 230 |
-
" <td>5</td>\n",
|
| 231 |
-
" <td>1</td>\n",
|
| 232 |
-
" </tr>\n",
|
| 233 |
-
" <tr>\n",
|
| 234 |
-
" <th>4078314</th>\n",
|
| 235 |
-
" <td>2022-03-17</td>\n",
|
| 236 |
-
" <td>Republic Airlines</td>\n",
|
| 237 |
-
" <td>CLT</td>\n",
|
| 238 |
-
" <td>EWR</td>\n",
|
| 239 |
-
" <td>True</td>\n",
|
| 240 |
-
" <td>False</td>\n",
|
| 241 |
-
" <td>1733</td>\n",
|
| 242 |
-
" <td>1817.0</td>\n",
|
| 243 |
-
" <td>44.0</td>\n",
|
| 244 |
-
" <td>44.0</td>\n",
|
| 245 |
-
" <td>...</td>\n",
|
| 246 |
-
" <td>NaN</td>\n",
|
| 247 |
-
" <td>NaN</td>\n",
|
| 248 |
-
" <td>NaN</td>\n",
|
| 249 |
-
" <td>1942</td>\n",
|
| 250 |
-
" <td>NaN</td>\n",
|
| 251 |
-
" <td>NaN</td>\n",
|
| 252 |
-
" <td>NaN</td>\n",
|
| 253 |
-
" <td>1900-1959</td>\n",
|
| 254 |
-
" <td>3</td>\n",
|
| 255 |
-
" <td>0</td>\n",
|
| 256 |
-
" </tr>\n",
|
| 257 |
-
" <tr>\n",
|
| 258 |
-
" <th>4078315</th>\n",
|
| 259 |
-
" <td>2022-03-08</td>\n",
|
| 260 |
-
" <td>Republic Airlines</td>\n",
|
| 261 |
-
" <td>ALB</td>\n",
|
| 262 |
-
" <td>ORD</td>\n",
|
| 263 |
-
" <td>False</td>\n",
|
| 264 |
-
" <td>False</td>\n",
|
| 265 |
-
" <td>1700</td>\n",
|
| 266 |
-
" <td>2318.0</td>\n",
|
| 267 |
-
" <td>378.0</td>\n",
|
| 268 |
-
" <td>378.0</td>\n",
|
| 269 |
-
" <td>...</td>\n",
|
| 270 |
-
" <td>2337.0</td>\n",
|
| 271 |
-
" <td>52.0</td>\n",
|
| 272 |
-
" <td>7.0</td>\n",
|
| 273 |
-
" <td>1838</td>\n",
|
| 274 |
-
" <td>381.0</td>\n",
|
| 275 |
-
" <td>1.0</td>\n",
|
| 276 |
-
" <td>12.0</td>\n",
|
| 277 |
-
" <td>1800-1859</td>\n",
|
| 278 |
-
" <td>3</td>\n",
|
| 279 |
-
" <td>0</td>\n",
|
| 280 |
-
" </tr>\n",
|
| 281 |
-
" <tr>\n",
|
| 282 |
-
" <th>4078316</th>\n",
|
| 283 |
-
" <td>2022-03-25</td>\n",
|
| 284 |
-
" <td>Republic Airlines</td>\n",
|
| 285 |
-
" <td>EWR</td>\n",
|
| 286 |
-
" <td>PIT</td>\n",
|
| 287 |
-
" <td>False</td>\n",
|
| 288 |
-
" <td>True</td>\n",
|
| 289 |
-
" <td>2129</td>\n",
|
| 290 |
-
" <td>2322.0</td>\n",
|
| 291 |
-
" <td>113.0</td>\n",
|
| 292 |
-
" <td>113.0</td>\n",
|
| 293 |
-
" <td>...</td>\n",
|
| 294 |
-
" <td>2347.0</td>\n",
|
| 295 |
-
" <td>933.0</td>\n",
|
| 296 |
-
" <td>6.0</td>\n",
|
| 297 |
-
" <td>2255</td>\n",
|
| 298 |
-
" <td>NaN</td>\n",
|
| 299 |
-
" <td>NaN</td>\n",
|
| 300 |
-
" <td>NaN</td>\n",
|
| 301 |
-
" <td>2200-2259</td>\n",
|
| 302 |
-
" <td>2</td>\n",
|
| 303 |
-
" <td>1</td>\n",
|
| 304 |
-
" </tr>\n",
|
| 305 |
-
" <tr>\n",
|
| 306 |
-
" <th>4078317</th>\n",
|
| 307 |
-
" <td>2022-03-07</td>\n",
|
| 308 |
-
" <td>Republic Airlines</td>\n",
|
| 309 |
-
" <td>EWR</td>\n",
|
| 310 |
-
" <td>RDU</td>\n",
|
| 311 |
-
" <td>False</td>\n",
|
| 312 |
-
" <td>True</td>\n",
|
| 313 |
-
" <td>1154</td>\n",
|
| 314 |
-
" <td>1148.0</td>\n",
|
| 315 |
-
" <td>0.0</td>\n",
|
| 316 |
-
" <td>-6.0</td>\n",
|
| 317 |
-
" <td>...</td>\n",
|
| 318 |
-
" <td>1201.0</td>\n",
|
| 319 |
-
" <td>1552.0</td>\n",
|
| 320 |
-
" <td>4.0</td>\n",
|
| 321 |
-
" <td>1333</td>\n",
|
| 322 |
-
" <td>NaN</td>\n",
|
| 323 |
-
" <td>NaN</td>\n",
|
| 324 |
-
" <td>NaN</td>\n",
|
| 325 |
-
" <td>1300-1359</td>\n",
|
| 326 |
-
" <td>2</td>\n",
|
| 327 |
-
" <td>1</td>\n",
|
| 328 |
-
" </tr>\n",
|
| 329 |
-
" </tbody>\n",
|
| 330 |
-
"</table>\n",
|
| 331 |
-
"<p>4078318 rows × 61 columns</p>\n",
|
| 332 |
-
"</div>"
|
| 333 |
-
],
|
| 334 |
-
"text/plain": [
|
| 335 |
-
" FlightDate Airline Origin Dest \\\n",
|
| 336 |
-
"0 2022-04-04 Commutair Aka Champlain Enterprises, Inc. GJT DEN \n",
|
| 337 |
-
"1 2022-04-04 Commutair Aka Champlain Enterprises, Inc. HRL IAH \n",
|
| 338 |
-
"2 2022-04-04 Commutair Aka Champlain Enterprises, Inc. DRO DEN \n",
|
| 339 |
-
"3 2022-04-04 Commutair Aka Champlain Enterprises, Inc. IAH GPT \n",
|
| 340 |
-
"4 2022-04-04 Commutair Aka Champlain Enterprises, Inc. DRO DEN \n",
|
| 341 |
-
"... ... ... ... ... \n",
|
| 342 |
-
"4078313 2022-03-31 Republic Airlines MSY EWR \n",
|
| 343 |
-
"4078314 2022-03-17 Republic Airlines CLT EWR \n",
|
| 344 |
-
"4078315 2022-03-08 Republic Airlines ALB ORD \n",
|
| 345 |
-
"4078316 2022-03-25 Republic Airlines EWR PIT \n",
|
| 346 |
-
"4078317 2022-03-07 Republic Airlines EWR RDU \n",
|
| 347 |
-
"\n",
|
| 348 |
-
" Cancelled Diverted CRSDepTime DepTime DepDelayMinutes DepDelay \\\n",
|
| 349 |
-
"0 False False 1133 1123.0 0.0 -10.0 \n",
|
| 350 |
-
"1 False False 732 728.0 0.0 -4.0 \n",
|
| 351 |
-
"2 False False 1529 1514.0 0.0 -15.0 \n",
|
| 352 |
-
"3 False False 1435 1430.0 0.0 -5.0 \n",
|
| 353 |
-
"4 False False 1135 1135.0 0.0 0.0 \n",
|
| 354 |
-
"... ... ... ... ... ... ... \n",
|
| 355 |
-
"4078313 False True 1949 2014.0 25.0 25.0 \n",
|
| 356 |
-
"4078314 True False 1733 1817.0 44.0 44.0 \n",
|
| 357 |
-
"4078315 False False 1700 2318.0 378.0 378.0 \n",
|
| 358 |
-
"4078316 False True 2129 2322.0 113.0 113.0 \n",
|
| 359 |
-
"4078317 False True 1154 1148.0 0.0 -6.0 \n",
|
| 360 |
-
"\n",
|
| 361 |
-
" ... WheelsOff WheelsOn TaxiIn CRSArrTime ArrDelay ArrDel15 \\\n",
|
| 362 |
-
"0 ... 1140.0 1220.0 8.0 1245 -17.0 0.0 \n",
|
| 363 |
-
"1 ... 744.0 839.0 9.0 849 -1.0 0.0 \n",
|
| 364 |
-
"2 ... 1535.0 1622.0 14.0 1639 -3.0 0.0 \n",
|
| 365 |
-
"3 ... 1446.0 1543.0 4.0 1605 -18.0 0.0 \n",
|
| 366 |
-
"4 ... 1154.0 1243.0 8.0 1245 6.0 0.0 \n",
|
| 367 |
-
"... ... ... ... ... ... ... ... \n",
|
| 368 |
-
"4078313 ... 2031.0 202.0 32.0 2354 NaN NaN \n",
|
| 369 |
-
"4078314 ... NaN NaN NaN 1942 NaN NaN \n",
|
| 370 |
-
"4078315 ... 2337.0 52.0 7.0 1838 381.0 1.0 \n",
|
| 371 |
-
"4078316 ... 2347.0 933.0 6.0 2255 NaN NaN \n",
|
| 372 |
-
"4078317 ... 1201.0 1552.0 4.0 1333 NaN NaN \n",
|
| 373 |
-
"\n",
|
| 374 |
-
" ArrivalDelayGroups ArrTimeBlk DistanceGroup DivAirportLandings \n",
|
| 375 |
-
"0 -2.0 1200-1259 1 0 \n",
|
| 376 |
-
"1 -1.0 0800-0859 2 0 \n",
|
| 377 |
-
"2 -1.0 1600-1659 2 0 \n",
|
| 378 |
-
"3 -2.0 1600-1659 2 0 \n",
|
| 379 |
-
"4 0.0 1200-1259 2 0 \n",
|
| 380 |
-
"... ... ... ... ... \n",
|
| 381 |
-
"4078313 NaN 2300-2359 5 1 \n",
|
| 382 |
-
"4078314 NaN 1900-1959 3 0 \n",
|
| 383 |
-
"4078315 12.0 1800-1859 3 0 \n",
|
| 384 |
-
"4078316 NaN 2200-2259 2 1 \n",
|
| 385 |
-
"4078317 NaN 1300-1359 2 1 \n",
|
| 386 |
-
"\n",
|
| 387 |
-
"[4078318 rows x 61 columns]"
|
| 388 |
-
]
|
| 389 |
-
},
|
| 390 |
-
"execution_count": 17,
|
| 391 |
-
"metadata": {},
|
| 392 |
-
"output_type": "execute_result"
|
| 393 |
-
}
|
| 394 |
-
],
|
| 395 |
-
"source": [
|
| 396 |
-
"data"
|
| 397 |
-
]
|
| 398 |
-
},
|
| 399 |
-
{
|
| 400 |
-
"cell_type": "code",
|
| 401 |
-
"execution_count": 6,
|
| 402 |
-
"id": "e572970c",
|
| 403 |
-
"metadata": {},
|
| 404 |
-
"outputs": [],
|
| 405 |
-
"source": [
|
| 406 |
-
"str_data = data.astype(str)"
|
| 407 |
-
]
|
| 408 |
-
},
|
| 409 |
-
{
|
| 410 |
-
"cell_type": "code",
|
| 411 |
-
"execution_count": 7,
|
| 412 |
-
"id": "27a7cd6b",
|
| 413 |
-
"metadata": {},
|
| 414 |
-
"outputs": [],
|
| 415 |
-
"source": [
|
| 416 |
-
"column_names = ', '.join(data.columns.tolist())"
|
| 417 |
-
]
|
| 418 |
-
},
|
| 419 |
-
{
|
| 420 |
-
"cell_type": "code",
|
| 421 |
-
"execution_count": 8,
|
| 422 |
-
"id": "a5cf51cc",
|
| 423 |
-
"metadata": {},
|
| 424 |
-
"outputs": [
|
| 425 |
-
{
|
| 426 |
-
"data": {
|
| 427 |
-
"text/plain": [
|
| 428 |
-
"'FlightDate, Airline, Origin, Dest, Cancelled, Diverted, CRSDepTime, DepTime, DepDelayMinutes, DepDelay, ArrTime, ArrDelayMinutes, AirTime, CRSElapsedTime, ActualElapsedTime, Distance, Year, Quarter, Month, DayofMonth, DayOfWeek, Marketing_Airline_Network, Operated_or_Branded_Code_Share_Partners, DOT_ID_Marketing_Airline, IATA_Code_Marketing_Airline, Flight_Number_Marketing_Airline, Operating_Airline, DOT_ID_Operating_Airline, IATA_Code_Operating_Airline, Tail_Number, Flight_Number_Operating_Airline, OriginAirportID, OriginAirportSeqID, OriginCityMarketID, OriginCityName, OriginState, OriginStateFips, OriginStateName, OriginWac, DestAirportID, DestAirportSeqID, DestCityMarketID, DestCityName, DestState, DestStateFips, DestStateName, DestWac, DepDel15, DepartureDelayGroups, DepTimeBlk, TaxiOut, WheelsOff, WheelsOn, TaxiIn, CRSArrTime, ArrDelay, ArrDel15, ArrivalDelayGroups, ArrTimeBlk, DistanceGroup, DivAirportLandings'"
|
| 429 |
-
]
|
| 430 |
-
},
|
| 431 |
-
"execution_count": 8,
|
| 432 |
-
"metadata": {},
|
| 433 |
-
"output_type": "execute_result"
|
| 434 |
-
}
|
| 435 |
-
],
|
| 436 |
-
"source": [
|
| 437 |
-
"column_names"
|
| 438 |
-
]
|
| 439 |
-
},
|
| 440 |
-
{
|
| 441 |
-
"cell_type": "code",
|
| 442 |
-
"execution_count": 15,
|
| 443 |
-
"id": "061d3979",
|
| 444 |
-
"metadata": {},
|
| 445 |
-
"outputs": [],
|
| 446 |
-
"source": [
|
| 447 |
-
"pd.options.display.max_rows = 300"
|
| 448 |
-
]
|
| 449 |
-
},
|
| 450 |
-
{
|
| 451 |
-
"cell_type": "code",
|
| 452 |
-
"execution_count": 21,
|
| 453 |
-
"id": "e44254fc",
|
| 454 |
-
"metadata": {
|
| 455 |
-
"scrolled": false
|
| 456 |
-
},
|
| 457 |
-
"outputs": [
|
| 458 |
-
{
|
| 459 |
-
"name": "stdout",
|
| 460 |
-
"output_type": "stream",
|
| 461 |
-
"text": [
|
| 462 |
-
"FlightDate 2022-04-04\n",
|
| 463 |
-
"Airline Commutair Aka Champlain Enterprises, Inc.\n",
|
| 464 |
-
"Origin DEN\n",
|
| 465 |
-
"Dest CPR\n",
|
| 466 |
-
"Cancelled False\n",
|
| 467 |
-
"Diverted False\n",
|
| 468 |
-
"CRSDepTime 1540\n",
|
| 469 |
-
"DepTime 1546.0\n",
|
| 470 |
-
"DepDelayMinutes 6.0\n",
|
| 471 |
-
"DepDelay 6.0\n",
|
| 472 |
-
"ArrTime 1650.0\n",
|
| 473 |
-
"ArrDelayMinutes 0.0\n",
|
| 474 |
-
"AirTime 45.0\n",
|
| 475 |
-
"CRSElapsedTime 70.0\n",
|
| 476 |
-
"ActualElapsedTime 64.0\n",
|
| 477 |
-
"Distance 230.0\n",
|
| 478 |
-
"Year 2022\n",
|
| 479 |
-
"Quarter 2\n",
|
| 480 |
-
"Month 4\n",
|
| 481 |
-
"DayofMonth 4\n",
|
| 482 |
-
"DayOfWeek 1\n",
|
| 483 |
-
"Marketing_Airline_Network UA\n",
|
| 484 |
-
"Operated_or_Branded_Code_Share_Partners UA_CODESHARE\n",
|
| 485 |
-
"DOT_ID_Marketing_Airline 19977\n",
|
| 486 |
-
"IATA_Code_Marketing_Airline UA\n",
|
| 487 |
-
"Flight_Number_Marketing_Airline 4288\n",
|
| 488 |
-
"Operating_Airline C5\n",
|
| 489 |
-
"DOT_ID_Operating_Airline 20445\n",
|
| 490 |
-
"IATA_Code_Operating_Airline C5\n",
|
| 491 |
-
"Tail_Number N14177\n",
|
| 492 |
-
"Flight_Number_Operating_Airline 4288\n",
|
| 493 |
-
"OriginAirportID 11292\n",
|
| 494 |
-
"OriginAirportSeqID 1129202\n",
|
| 495 |
-
"OriginCityMarketID 30325\n",
|
| 496 |
-
"OriginCityName Denver, CO\n",
|
| 497 |
-
"OriginState CO\n",
|
| 498 |
-
"OriginStateFips 8\n",
|
| 499 |
-
"OriginStateName Colorado\n",
|
| 500 |
-
"OriginWac 82\n",
|
| 501 |
-
"DestAirportID 11122\n",
|
| 502 |
-
"DestAirportSeqID 1112205\n",
|
| 503 |
-
"DestCityMarketID 31122\n",
|
| 504 |
-
"DestCityName Casper, WY\n",
|
| 505 |
-
"DestState WY\n",
|
| 506 |
-
"DestStateFips 56\n",
|
| 507 |
-
"DestStateName Wyoming\n",
|
| 508 |
-
"DestWac 88\n",
|
| 509 |
-
"DepDel15 0.0\n",
|
| 510 |
-
"DepartureDelayGroups 0.0\n",
|
| 511 |
-
"DepTimeBlk 1500-1559\n",
|
| 512 |
-
"TaxiOut 13.0\n",
|
| 513 |
-
"WheelsOff 1559.0\n",
|
| 514 |
-
"WheelsOn 1644.0\n",
|
| 515 |
-
"TaxiIn 6.0\n",
|
| 516 |
-
"CRSArrTime 1650\n",
|
| 517 |
-
"ArrDelay 0.0\n",
|
| 518 |
-
"ArrDel15 0.0\n",
|
| 519 |
-
"ArrivalDelayGroups 0.0\n",
|
| 520 |
-
"ArrTimeBlk 1600-1659\n",
|
| 521 |
-
"DistanceGroup 1\n",
|
| 522 |
-
"DivAirportLandings 0\n",
|
| 523 |
-
"Name: 10, dtype: object\n"
|
| 524 |
-
]
|
| 525 |
-
}
|
| 526 |
-
],
|
| 527 |
-
"source": [
|
| 528 |
-
"print(data.iloc[10],flush=True)"
|
| 529 |
-
]
|
| 530 |
-
},
|
| 531 |
-
{
|
| 532 |
-
"cell_type": "code",
|
| 533 |
-
"execution_count": 57,
|
| 534 |
-
"id": "1a0f208d",
|
| 535 |
-
"metadata": {},
|
| 536 |
-
"outputs": [],
|
| 537 |
-
"source": [
|
| 538 |
-
"filter_data = data[['FlightDate','DepTime','ArrTime','Distance','OriginCityName','DestCityName']]"
|
| 539 |
-
]
|
| 540 |
-
},
|
| 541 |
-
{
|
| 542 |
-
"cell_type": "code",
|
| 543 |
-
"execution_count": 58,
|
| 544 |
-
"id": "4cf6383d",
|
| 545 |
-
"metadata": {},
|
| 546 |
-
"outputs": [
|
| 547 |
-
{
|
| 548 |
-
"name": "stdout",
|
| 549 |
-
"output_type": "stream",
|
| 550 |
-
"text": [
|
| 551 |
-
"FlightDate\n",
|
| 552 |
-
"DepTime\n",
|
| 553 |
-
"ArrTime\n",
|
| 554 |
-
"Distance\n",
|
| 555 |
-
"OriginCityName\n",
|
| 556 |
-
"DestCityName\n"
|
| 557 |
-
]
|
| 558 |
-
}
|
| 559 |
-
],
|
| 560 |
-
"source": [
|
| 561 |
-
"for unit in filter_data:\n",
|
| 562 |
-
" print(unit)"
|
| 563 |
-
]
|
| 564 |
-
},
|
| 565 |
-
{
|
| 566 |
-
"cell_type": "code",
|
| 567 |
-
"execution_count": 63,
|
| 568 |
-
"id": "ddbf175a",
|
| 569 |
-
"metadata": {},
|
| 570 |
-
"outputs": [
|
| 571 |
-
{
|
| 572 |
-
"data": {
|
| 573 |
-
"application/vnd.jupyter.widget-view+json": {
|
| 574 |
-
"model_id": "fc2986be7e664907986359e2bcf22671",
|
| 575 |
-
"version_major": 2,
|
| 576 |
-
"version_minor": 0
|
| 577 |
-
},
|
| 578 |
-
"text/plain": [
|
| 579 |
-
"0it [00:00, ?it/s]"
|
| 580 |
-
]
|
| 581 |
-
},
|
| 582 |
-
"metadata": {},
|
| 583 |
-
"output_type": "display_data"
|
| 584 |
-
},
|
| 585 |
-
{
|
| 586 |
-
"name": "stderr",
|
| 587 |
-
"output_type": "stream",
|
| 588 |
-
"text": [
|
| 589 |
-
"IOPub message rate exceeded.\n",
|
| 590 |
-
"The notebook server will temporarily stop sending output\n",
|
| 591 |
-
"to the client in order to avoid crashing it.\n",
|
| 592 |
-
"To change this limit, set the config variable\n",
|
| 593 |
-
"`--NotebookApp.iopub_msg_rate_limit`.\n",
|
| 594 |
-
"\n",
|
| 595 |
-
"Current values:\n",
|
| 596 |
-
"NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)\n",
|
| 597 |
-
"NotebookApp.rate_limit_window=3.0 (secs)\n",
|
| 598 |
-
"\n"
|
| 599 |
-
]
|
| 600 |
-
},
|
| 601 |
-
{
|
| 602 |
-
"ename": "KeyboardInterrupt",
|
| 603 |
-
"evalue": "",
|
| 604 |
-
"output_type": "error",
|
| 605 |
-
"traceback": [
|
| 606 |
-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 607 |
-
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
| 608 |
-
"Cell \u001b[0;32mIn[63], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtqdm\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mautonotebook\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tqdm\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m idx, unit \u001b[38;5;129;01min\u001b[39;00m tqdm(\u001b[38;5;28menumerate\u001b[39m(filter_data\u001b[38;5;241m.\u001b[39miterrows())):\n\u001b[0;32m----> 3\u001b[0m \u001b[43mfilter_data\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mloc\u001b[49m\u001b[43m[\u001b[49m\u001b[43midx\u001b[49m\u001b[43m,\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mOriginCityName\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m \u001b[38;5;241m=\u001b[39m unit[\u001b[38;5;241m1\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mOriginCityName\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39msplit(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m,\u001b[39m\u001b[38;5;124m'\u001b[39m)[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 4\u001b[0m filter_data\u001b[38;5;241m.\u001b[39mloc[idx,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDestCityName\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m=\u001b[39m unit[\u001b[38;5;241m1\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDestCityName\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39msplit(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m,\u001b[39m\u001b[38;5;124m'\u001b[39m)[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 5\u001b[0m filter_data\u001b[38;5;241m.\u001b[39mloc[idx,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mprice\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mint\u001b[39m((unit[\u001b[38;5;241m1\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDistance\u001b[39m\u001b[38;5;124m'\u001b[39m]) \u001b[38;5;241m*\u001b[39m random\u001b[38;5;241m.\u001b[39muniform(\u001b[38;5;241m0.2\u001b[39m,\u001b[38;5;241m0.5\u001b[39m))\n",
|
| 609 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/indexing.py:849\u001b[0m, in \u001b[0;36m_LocationIndexer.__setitem__\u001b[0;34m(self, key, value)\u001b[0m\n\u001b[1;32m 846\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_has_valid_setitem_indexer(key)\n\u001b[1;32m 848\u001b[0m iloc \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124miloc\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mobj\u001b[38;5;241m.\u001b[39miloc\n\u001b[0;32m--> 849\u001b[0m \u001b[43miloc\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_setitem_with_indexer\u001b[49m\u001b[43m(\u001b[49m\u001b[43mindexer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\n",
|
| 610 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/indexing.py:1835\u001b[0m, in \u001b[0;36m_iLocIndexer._setitem_with_indexer\u001b[0;34m(self, indexer, value, name)\u001b[0m\n\u001b[1;32m 1832\u001b[0m \u001b[38;5;66;03m# align and set the values\u001b[39;00m\n\u001b[1;32m 1833\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m take_split_path:\n\u001b[1;32m 1834\u001b[0m \u001b[38;5;66;03m# We have to operate column-wise\u001b[39;00m\n\u001b[0;32m-> 1835\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_setitem_with_indexer_split_path\u001b[49m\u001b[43m(\u001b[49m\u001b[43mindexer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1836\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1837\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_setitem_single_block(indexer, value, name)\n",
|
| 611 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/indexing.py:1928\u001b[0m, in \u001b[0;36m_iLocIndexer._setitem_with_indexer_split_path\u001b[0;34m(self, indexer, value, name)\u001b[0m\n\u001b[1;32m 1925\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1926\u001b[0m \u001b[38;5;66;03m# scalar value\u001b[39;00m\n\u001b[1;32m 1927\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m loc \u001b[38;5;129;01min\u001b[39;00m ilocs:\n\u001b[0;32m-> 1928\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_setitem_single_column\u001b[49m\u001b[43m(\u001b[49m\u001b[43mloc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpi\u001b[49m\u001b[43m)\u001b[49m\n",
|
| 612 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/indexing.py:2034\u001b[0m, in \u001b[0;36m_iLocIndexer._setitem_single_column\u001b[0;34m(self, loc, value, plane_indexer)\u001b[0m\n\u001b[1;32m 2030\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mobj\u001b[38;5;241m.\u001b[39misetitem(loc, value)\n\u001b[1;32m 2031\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 2032\u001b[0m \u001b[38;5;66;03m# set value into the column (first attempting to operate inplace, then\u001b[39;00m\n\u001b[1;32m 2033\u001b[0m \u001b[38;5;66;03m# falling back to casting if necessary)\u001b[39;00m\n\u001b[0;32m-> 2034\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mobj\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_mgr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcolumn_setitem\u001b[49m\u001b[43m(\u001b[49m\u001b[43mloc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mplane_indexer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2036\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mobj\u001b[38;5;241m.\u001b[39m_clear_item_cache()\n",
|
| 613 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/internals/managers.py:1385\u001b[0m, in \u001b[0;36mBlockManager.column_setitem\u001b[0;34m(self, loc, idx, value, inplace_only)\u001b[0m\n\u001b[1;32m 1383\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1384\u001b[0m new_mgr \u001b[38;5;241m=\u001b[39m col_mgr\u001b[38;5;241m.\u001b[39msetitem((idx,), value)\n\u001b[0;32m-> 1385\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43miset\u001b[49m\u001b[43m(\u001b[49m\u001b[43mloc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnew_mgr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_block\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalues\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43minplace\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n",
|
| 614 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/internals/managers.py:1213\u001b[0m, in \u001b[0;36mBlockManager.iset\u001b[0;34m(self, loc, value, inplace)\u001b[0m\n\u001b[1;32m 1211\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_iset_split_block(blkno_l, blk_locs, value_getitem(val_locs))\n\u001b[1;32m 1212\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1213\u001b[0m \u001b[43mblk\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_inplace\u001b[49m\u001b[43m(\u001b[49m\u001b[43mblk_locs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue_getitem\u001b[49m\u001b[43m(\u001b[49m\u001b[43mval_locs\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1214\u001b[0m \u001b[38;5;28;01mcontinue\u001b[39;00m\n\u001b[1;32m 1215\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
|
| 615 |
-
"File \u001b[0;32m~/miniconda3/envs/py39/lib/python3.9/site-packages/pandas/core/internals/blocks.py:924\u001b[0m, in \u001b[0;36mBlock.set_inplace\u001b[0;34m(self, locs, values, copy)\u001b[0m\n\u001b[1;32m 922\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m copy:\n\u001b[1;32m 923\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mvalues \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mvalues\u001b[38;5;241m.\u001b[39mcopy()\n\u001b[0;32m--> 924\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalues\u001b[49m\u001b[43m[\u001b[49m\u001b[43mlocs\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;241m=\u001b[39m values\n",
|
| 616 |
-
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
|
| 617 |
-
]
|
| 618 |
-
}
|
| 619 |
-
],
|
| 620 |
-
"source": [
|
| 621 |
-
"from tqdm.autonotebook import tqdm\n",
|
| 622 |
-
"for idx, unit in tqdm(enumerate(filter_data.iterrows())):\n",
|
| 623 |
-
" filter_data.loc[idx,'OriginCityName'] = unit[1]['OriginCityName'].split(',')[0]\n",
|
| 624 |
-
" filter_data.loc[idx,'DestCityName'] = unit[1]['DestCityName'].split(',')[0]\n",
|
| 625 |
-
" filter_data.loc[idx,'price'] = int((unit[1]['Distance']) * random.uniform(0.2,0.5))"
|
| 626 |
-
]
|
| 627 |
-
},
|
| 628 |
-
{
|
| 629 |
-
"cell_type": "code",
|
| 630 |
-
"execution_count": 62,
|
| 631 |
-
"id": "0ac9a59d",
|
| 632 |
-
"metadata": {},
|
| 633 |
-
"outputs": [
|
| 634 |
-
{
|
| 635 |
-
"data": {
|
| 636 |
-
"text/html": [
|
| 637 |
-
"<div>\n",
|
| 638 |
-
"<style scoped>\n",
|
| 639 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 640 |
-
" vertical-align: middle;\n",
|
| 641 |
-
" }\n",
|
| 642 |
-
"\n",
|
| 643 |
-
" .dataframe tbody tr th {\n",
|
| 644 |
-
" vertical-align: top;\n",
|
| 645 |
-
" }\n",
|
| 646 |
-
"\n",
|
| 647 |
-
" .dataframe thead th {\n",
|
| 648 |
-
" text-align: right;\n",
|
| 649 |
-
" }\n",
|
| 650 |
-
"</style>\n",
|
| 651 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 652 |
-
" <thead>\n",
|
| 653 |
-
" <tr style=\"text-align: right;\">\n",
|
| 654 |
-
" <th></th>\n",
|
| 655 |
-
" <th>FlightDate</th>\n",
|
| 656 |
-
" <th>DepTime</th>\n",
|
| 657 |
-
" <th>ArrTime</th>\n",
|
| 658 |
-
" <th>Distance</th>\n",
|
| 659 |
-
" <th>OriginCityName</th>\n",
|
| 660 |
-
" <th>DestCityName</th>\n",
|
| 661 |
-
" <th>price</th>\n",
|
| 662 |
-
" </tr>\n",
|
| 663 |
-
" </thead>\n",
|
| 664 |
-
" <tbody>\n",
|
| 665 |
-
" <tr>\n",
|
| 666 |
-
" <th>0</th>\n",
|
| 667 |
-
" <td>2022-04-04</td>\n",
|
| 668 |
-
" <td>1123.0</td>\n",
|
| 669 |
-
" <td>1228.0</td>\n",
|
| 670 |
-
" <td>212.0</td>\n",
|
| 671 |
-
" <td>Grand Junction</td>\n",
|
| 672 |
-
" <td>Denver</td>\n",
|
| 673 |
-
" <td>72.0</td>\n",
|
| 674 |
-
" </tr>\n",
|
| 675 |
-
" <tr>\n",
|
| 676 |
-
" <th>1</th>\n",
|
| 677 |
-
" <td>2022-04-04</td>\n",
|
| 678 |
-
" <td>728.0</td>\n",
|
| 679 |
-
" <td>848.0</td>\n",
|
| 680 |
-
" <td>295.0</td>\n",
|
| 681 |
-
" <td>Harlingen/San Benito</td>\n",
|
| 682 |
-
" <td>Houston</td>\n",
|
| 683 |
-
" <td>141.0</td>\n",
|
| 684 |
-
" </tr>\n",
|
| 685 |
-
" <tr>\n",
|
| 686 |
-
" <th>2</th>\n",
|
| 687 |
-
" <td>2022-04-04</td>\n",
|
| 688 |
-
" <td>1514.0</td>\n",
|
| 689 |
-
" <td>1636.0</td>\n",
|
| 690 |
-
" <td>251.0</td>\n",
|
| 691 |
-
" <td>Durango</td>\n",
|
| 692 |
-
" <td>Denver</td>\n",
|
| 693 |
-
" <td>114.0</td>\n",
|
| 694 |
-
" </tr>\n",
|
| 695 |
-
" <tr>\n",
|
| 696 |
-
" <th>3</th>\n",
|
| 697 |
-
" <td>2022-04-04</td>\n",
|
| 698 |
-
" <td>1430.0</td>\n",
|
| 699 |
-
" <td>1547.0</td>\n",
|
| 700 |
-
" <td>376.0</td>\n",
|
| 701 |
-
" <td>Houston</td>\n",
|
| 702 |
-
" <td>Gulfport/Biloxi</td>\n",
|
| 703 |
-
" <td>103.0</td>\n",
|
| 704 |
-
" </tr>\n",
|
| 705 |
-
" <tr>\n",
|
| 706 |
-
" <th>4</th>\n",
|
| 707 |
-
" <td>2022-04-04</td>\n",
|
| 708 |
-
" <td>1135.0</td>\n",
|
| 709 |
-
" <td>1251.0</td>\n",
|
| 710 |
-
" <td>251.0</td>\n",
|
| 711 |
-
" <td>Durango</td>\n",
|
| 712 |
-
" <td>Denver</td>\n",
|
| 713 |
-
" <td>118.0</td>\n",
|
| 714 |
-
" </tr>\n",
|
| 715 |
-
" <tr>\n",
|
| 716 |
-
" <th>...</th>\n",
|
| 717 |
-
" <td>...</td>\n",
|
| 718 |
-
" <td>...</td>\n",
|
| 719 |
-
" <td>...</td>\n",
|
| 720 |
-
" <td>...</td>\n",
|
| 721 |
-
" <td>...</td>\n",
|
| 722 |
-
" <td>...</td>\n",
|
| 723 |
-
" <td>...</td>\n",
|
| 724 |
-
" </tr>\n",
|
| 725 |
-
" <tr>\n",
|
| 726 |
-
" <th>4078313</th>\n",
|
| 727 |
-
" <td>2022-03-31</td>\n",
|
| 728 |
-
" <td>2014.0</td>\n",
|
| 729 |
-
" <td>234.0</td>\n",
|
| 730 |
-
" <td>1167.0</td>\n",
|
| 731 |
-
" <td>New Orleans, LA</td>\n",
|
| 732 |
-
" <td>Newark, NJ</td>\n",
|
| 733 |
-
" <td>NaN</td>\n",
|
| 734 |
-
" </tr>\n",
|
| 735 |
-
" <tr>\n",
|
| 736 |
-
" <th>4078314</th>\n",
|
| 737 |
-
" <td>2022-03-17</td>\n",
|
| 738 |
-
" <td>1817.0</td>\n",
|
| 739 |
-
" <td>NaN</td>\n",
|
| 740 |
-
" <td>529.0</td>\n",
|
| 741 |
-
" <td>Charlotte, NC</td>\n",
|
| 742 |
-
" <td>Newark, NJ</td>\n",
|
| 743 |
-
" <td>NaN</td>\n",
|
| 744 |
-
" </tr>\n",
|
| 745 |
-
" <tr>\n",
|
| 746 |
-
" <th>4078315</th>\n",
|
| 747 |
-
" <td>2022-03-08</td>\n",
|
| 748 |
-
" <td>2318.0</td>\n",
|
| 749 |
-
" <td>59.0</td>\n",
|
| 750 |
-
" <td>723.0</td>\n",
|
| 751 |
-
" <td>Albany, NY</td>\n",
|
| 752 |
-
" <td>Chicago, IL</td>\n",
|
| 753 |
-
" <td>NaN</td>\n",
|
| 754 |
-
" </tr>\n",
|
| 755 |
-
" <tr>\n",
|
| 756 |
-
" <th>4078316</th>\n",
|
| 757 |
-
" <td>2022-03-25</td>\n",
|
| 758 |
-
" <td>2322.0</td>\n",
|
| 759 |
-
" <td>939.0</td>\n",
|
| 760 |
-
" <td>319.0</td>\n",
|
| 761 |
-
" <td>Newark, NJ</td>\n",
|
| 762 |
-
" <td>Pittsburgh, PA</td>\n",
|
| 763 |
-
" <td>NaN</td>\n",
|
| 764 |
-
" </tr>\n",
|
| 765 |
-
" <tr>\n",
|
| 766 |
-
" <th>4078317</th>\n",
|
| 767 |
-
" <td>2022-03-07</td>\n",
|
| 768 |
-
" <td>1148.0</td>\n",
|
| 769 |
-
" <td>1556.0</td>\n",
|
| 770 |
-
" <td>416.0</td>\n",
|
| 771 |
-
" <td>Newark, NJ</td>\n",
|
| 772 |
-
" <td>Raleigh/Durham, NC</td>\n",
|
| 773 |
-
" <td>NaN</td>\n",
|
| 774 |
-
" </tr>\n",
|
| 775 |
-
" </tbody>\n",
|
| 776 |
-
"</table>\n",
|
| 777 |
-
"<p>4078318 rows × 7 columns</p>\n",
|
| 778 |
-
"</div>"
|
| 779 |
-
],
|
| 780 |
-
"text/plain": [
|
| 781 |
-
" FlightDate DepTime ArrTime Distance OriginCityName \\\n",
|
| 782 |
-
"0 2022-04-04 1123.0 1228.0 212.0 Grand Junction \n",
|
| 783 |
-
"1 2022-04-04 728.0 848.0 295.0 Harlingen/San Benito \n",
|
| 784 |
-
"2 2022-04-04 1514.0 1636.0 251.0 Durango \n",
|
| 785 |
-
"3 2022-04-04 1430.0 1547.0 376.0 Houston \n",
|
| 786 |
-
"4 2022-04-04 1135.0 1251.0 251.0 Durango \n",
|
| 787 |
-
"... ... ... ... ... ... \n",
|
| 788 |
-
"4078313 2022-03-31 2014.0 234.0 1167.0 New Orleans, LA \n",
|
| 789 |
-
"4078314 2022-03-17 1817.0 NaN 529.0 Charlotte, NC \n",
|
| 790 |
-
"4078315 2022-03-08 2318.0 59.0 723.0 Albany, NY \n",
|
| 791 |
-
"4078316 2022-03-25 2322.0 939.0 319.0 Newark, NJ \n",
|
| 792 |
-
"4078317 2022-03-07 1148.0 1556.0 416.0 Newark, NJ \n",
|
| 793 |
-
"\n",
|
| 794 |
-
" DestCityName price \n",
|
| 795 |
-
"0 Denver 72.0 \n",
|
| 796 |
-
"1 Houston 141.0 \n",
|
| 797 |
-
"2 Denver 114.0 \n",
|
| 798 |
-
"3 Gulfport/Biloxi 103.0 \n",
|
| 799 |
-
"4 Denver 118.0 \n",
|
| 800 |
-
"... ... ... \n",
|
| 801 |
-
"4078313 Newark, NJ NaN \n",
|
| 802 |
-
"4078314 Newark, NJ NaN \n",
|
| 803 |
-
"4078315 Chicago, IL NaN \n",
|
| 804 |
-
"4078316 Pittsburgh, PA NaN \n",
|
| 805 |
-
"4078317 Raleigh/Durham, NC NaN \n",
|
| 806 |
-
"\n",
|
| 807 |
-
"[4078318 rows x 7 columns]"
|
| 808 |
-
]
|
| 809 |
-
},
|
| 810 |
-
"execution_count": 62,
|
| 811 |
-
"metadata": {},
|
| 812 |
-
"output_type": "execute_result"
|
| 813 |
-
}
|
| 814 |
-
],
|
| 815 |
-
"source": [
|
| 816 |
-
"filter_data"
|
| 817 |
-
]
|
| 818 |
-
},
|
| 819 |
-
{
|
| 820 |
-
"cell_type": "code",
|
| 821 |
-
"execution_count": 43,
|
| 822 |
-
"id": "10a2b0e3",
|
| 823 |
-
"metadata": {},
|
| 824 |
-
"outputs": [
|
| 825 |
-
{
|
| 826 |
-
"data": {
|
| 827 |
-
"application/vnd.jupyter.widget-view+json": {
|
| 828 |
-
"model_id": "b7bbe97af9df406fb0e56a6f8dfd8656",
|
| 829 |
-
"version_major": 2,
|
| 830 |
-
"version_minor": 0
|
| 831 |
-
},
|
| 832 |
-
"text/plain": [
|
| 833 |
-
"0it [00:00, ?it/s]"
|
| 834 |
-
]
|
| 835 |
-
},
|
| 836 |
-
"metadata": {},
|
| 837 |
-
"output_type": "display_data"
|
| 838 |
-
},
|
| 839 |
-
{
|
| 840 |
-
"name": "stdout",
|
| 841 |
-
"output_type": "stream",
|
| 842 |
-
"text": [
|
| 843 |
-
"(0, FlightDate 2022-04-04\n",
|
| 844 |
-
"DepTime 1123.0\n",
|
| 845 |
-
"ArrTime 1228.0\n",
|
| 846 |
-
"Distance 212.0\n",
|
| 847 |
-
"OriginCityName Grand Junction\n",
|
| 848 |
-
"DestCityName Denver\n",
|
| 849 |
-
"Name: 0, dtype: object)\n"
|
| 850 |
-
]
|
| 851 |
-
}
|
| 852 |
-
],
|
| 853 |
-
"source": [
|
| 854 |
-
"import random\n",
|
| 855 |
-
"for idx, unit in tqdm(enumerate(filter_data.iterrows())):\n",
|
| 856 |
-
" filter_data.loc[idx,'price'] = eval(unit[1]['Distance']) * random.uniform(0.2,0.5))"
|
| 857 |
-
]
|
| 858 |
-
},
|
| 859 |
-
{
|
| 860 |
-
"cell_type": "code",
|
| 861 |
-
"execution_count": 44,
|
| 862 |
-
"id": "1ca1f597",
|
| 863 |
-
"metadata": {},
|
| 864 |
-
"outputs": [
|
| 865 |
-
{
|
| 866 |
-
"name": "stderr",
|
| 867 |
-
"output_type": "stream",
|
| 868 |
-
"text": [
|
| 869 |
-
"/tmp/ipykernel_1504075/2172656540.py:1: SettingWithCopyWarning: \n",
|
| 870 |
-
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
|
| 871 |
-
"Try using .loc[row_indexer,col_indexer] = value instead\n",
|
| 872 |
-
"\n",
|
| 873 |
-
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
|
| 874 |
-
" filter_data['price'] = None\n"
|
| 875 |
-
]
|
| 876 |
-
}
|
| 877 |
-
],
|
| 878 |
-
"source": [
|
| 879 |
-
"filter_data['price'] = None"
|
| 880 |
-
]
|
| 881 |
-
},
|
| 882 |
-
{
|
| 883 |
-
"cell_type": "code",
|
| 884 |
-
"execution_count": null,
|
| 885 |
-
"id": "e32d2e3c",
|
| 886 |
-
"metadata": {},
|
| 887 |
-
"outputs": [],
|
| 888 |
-
"source": [
|
| 889 |
-
"import random\n",
|
| 890 |
-
"random.uniform(0.2,0.5)"
|
| 891 |
-
]
|
| 892 |
-
},
|
| 893 |
-
{
|
| 894 |
-
"cell_type": "code",
|
| 895 |
-
"execution_count": null,
|
| 896 |
-
"id": "cf4ecc5e",
|
| 897 |
-
"metadata": {},
|
| 898 |
-
"outputs": [],
|
| 899 |
-
"source": []
|
| 900 |
-
}
|
| 901 |
-
],
|
| 902 |
-
"metadata": {
|
| 903 |
-
"kernelspec": {
|
| 904 |
-
"display_name": "Python 3 (ipykernel)",
|
| 905 |
-
"language": "python",
|
| 906 |
-
"name": "python3"
|
| 907 |
-
},
|
| 908 |
-
"language_info": {
|
| 909 |
-
"codemirror_mode": {
|
| 910 |
-
"name": "ipython",
|
| 911 |
-
"version": 3
|
| 912 |
-
},
|
| 913 |
-
"file_extension": ".py",
|
| 914 |
-
"mimetype": "text/x-python",
|
| 915 |
-
"name": "python",
|
| 916 |
-
"nbconvert_exporter": "python",
|
| 917 |
-
"pygments_lexer": "ipython3",
|
| 918 |
-
"version": "3.9.16"
|
| 919 |
-
}
|
| 920 |
-
},
|
| 921 |
-
"nbformat": 4,
|
| 922 |
-
"nbformat_minor": 5
|
| 923 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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