Last active
August 29, 2015 14:19
-
-
Save avonmoll/b081d35b09043d129b94 to your computer and use it in GitHub Desktop.
inter-country-routes.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:404a803dcb54f774776c8535f9eeeebd501538284e0d0285467c2655c5cdde21" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Inter-Country Flight Routes" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Data from OpenFlights\n", | |
"http://datahub.io/dataset/open-flights" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"import pandas as pd\n", | |
"%cd 'C:\\Users\\Alexander\\Documents\\School\\CSE 6730\\Project 2\\EbolaSimCode'" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"C:\\Users\\Alexander\\Documents\\School\\CSE 6730\\Project 2\\EbolaSimCode\n" | |
] | |
} | |
], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"df = pd.read_csv('airports.dat', index_col = False)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Countries considered:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"countries = ['Guinea', 'Liberia', 'Sierra Leone', 'Nigeria','Senegal','Mali']" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 3 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"rel_airports = df.loc[df['Country'].isin(countries)]\n", | |
"aID = rel_airports.ID.tolist()\n", | |
"aID = [e.astype(str) for e in aID]\n", | |
"routes = pd.read_csv('routes.dat', index_col = False)\n", | |
"routes[['SourceAirportID', 'DestAirportID']] = routes[['SourceAirportID', 'DestAirportID']].astype(str)\n", | |
"rel_routes = routes.loc[routes['SourceAirportID'].isin(aID) | routes['DestAirportID'].isin(aID)]\n", | |
"#rel_routes = rel_routes.loc[rel_routes['DestAirportID'].isin(aID)]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 4 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"len(rel_routes.index)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 5, | |
"text": [ | |
"438" | |
] | |
} | |
], | |
"prompt_number": 5 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Need to remove routes that are intra-country" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"#rel_routes = rel_routes.loc[rel_airports['Country'][rel_airports['ID'][rel_routes['SourceAirportID']]] !=rel_airports['Country'][rel_airports['ID'][rel_routes['DestAirportID']]]]\n", | |
"\n", | |
"valid_idx = []\n", | |
"source_countries = []\n", | |
"dest_countries = []\n", | |
"for i in range(len(rel_routes.index)):\n", | |
" source_i = rel_routes['SourceAirportID'].iloc[i]\n", | |
" dest_i = rel_routes['DestAirportID'].iloc[i]\n", | |
" try:\n", | |
" source_i = int(source_i)\n", | |
" dest_i = int(dest_i)\n", | |
" except:\n", | |
" pass\n", | |
" if type(source_i) == int and type(dest_i)==int:\n", | |
" try:\n", | |
" source_country = df.loc[df['ID'] == source_i]['Country'].iloc[0]\n", | |
" dest_country = df.loc[df['ID'] == dest_i]['Country'].iloc[0]\n", | |
" if source_country != dest_country:\n", | |
" valid_idx.append(i)\n", | |
" source_countries.append(source_country)\n", | |
" dest_countries.append(dest_country)\n", | |
" except:\n", | |
" pass\n", | |
" \n", | |
"rel_routes = rel_routes.iloc[valid_idx]\n", | |
"rel_routes['SourceCountry'] = pd.Series(source_countries, index=rel_routes.index)\n", | |
"rel_routes['DestCountry'] = pd.Series(dest_countries, index=rel_routes.index)\n", | |
"rel_routes.drop_duplicates(subset=['SourceAirport','DestAirport'], inplace=True)\n", | |
"rel_routes['MeanPeriod'] = pd.Series([-1]*len(rel_routes.index), index=rel_routes.index)\n", | |
"rel_routes['StdPeriod'] = pd.Series([-1]*len(rel_routes.index), index=rel_routes.index)\n", | |
"rel_routes['Seats'] = pd.Series([-1]*len(rel_routes.index), index=rel_routes.index)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Total number of inter-country routes" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"len(rel_routes.index)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 7, | |
"text": [ | |
"220" | |
] | |
} | |
], | |
"prompt_number": 7 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"rel_routes.to_csv('ebola-sim/relevant_routes.csv')" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 8 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"r = pd.read_csv('ebola-sim/relevant_routes.csv')\n", | |
"r" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Unnamed: 0</th>\n", | |
" <th>Airline</th>\n", | |
" <th>AirlineID</th>\n", | |
" <th>SourceAirport</th>\n", | |
" <th>SourceAirportID</th>\n", | |
" <th>DestAirport</th>\n", | |
" <th>DestAirportID</th>\n", | |
" <th>Codeshare</th>\n", | |
" <th>Stops</th>\n", | |
" <th>Equipment</th>\n", | |
" <th>SourceCountry</th>\n", | |
" <th>DestCountry</th>\n", | |
" <th>MeanPeriod</th>\n", | |
" <th>StdPeriod</th>\n", | |
" <th>Seats</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>84</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>ABJ</td>\n", | |
" <td>253</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87</td>\n", | |
" <td>Mali</td>\n", | |
" <td>Cote d'Ivoire</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>85</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87</td>\n", | |
" <td>Mali</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>86</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>OUA</td>\n", | |
" <td>246</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>CRJ</td>\n", | |
" <td>Mali</td>\n", | |
" <td>Burkina Faso</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>91</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Mali</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>92</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>OUA</td>\n", | |
" <td>246</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Burkina Faso</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>97</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>OUA</td>\n", | |
" <td>246</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87 CRJ</td>\n", | |
" <td>Burkina Faso</td>\n", | |
" <td>Mali</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>100</td>\n", | |
" <td>2J</td>\n", | |
" <td>470</td>\n", | |
" <td>OUA</td>\n", | |
" <td>246</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>M87</td>\n", | |
" <td>Burkina Faso</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>282</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>283</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>284</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>ROB</td>\n", | |
" <td>1063</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>Liberia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>287</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>BJL</td>\n", | |
" <td>1050</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Gambia</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>288</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>BJL</td>\n", | |
" <td>1050</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Gambia</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>289</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>CKY</td>\n", | |
" <td>4162</td>\n", | |
" <td>OXB</td>\n", | |
" <td>5665</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Guinea</td>\n", | |
" <td>Guinea-Bissau</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>290</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>291</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>BJL</td>\n", | |
" <td>1050</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Gambia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>292</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>DLA</td>\n", | |
" <td>897</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Cameroon</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>293</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>17</th>\n", | |
" <td>294</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>18</th>\n", | |
" <td>295</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>OXB</td>\n", | |
" <td>5665</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Guinea-Bissau</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>19</th>\n", | |
" <td>296</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DLA</td>\n", | |
" <td>897</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Cameroon</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>297</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>DLA</td>\n", | |
" <td>897</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Cameroon</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>21</th>\n", | |
" <td>298</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>BJL</td>\n", | |
" <td>1050</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>Gambia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>22</th>\n", | |
" <td>299</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>23</th>\n", | |
" <td>300</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>LGW</td>\n", | |
" <td>502</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>United Kingdom</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>24</th>\n", | |
" <td>301</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>ROB</td>\n", | |
" <td>1063</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>Liberia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>302</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>LGW</td>\n", | |
" <td>502</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>United Kingdom</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>26</th>\n", | |
" <td>303</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>27</th>\n", | |
" <td>304</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>28</th>\n", | |
" <td>305</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>DLA</td>\n", | |
" <td>897</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Cameroon</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>29</th>\n", | |
" <td>306</td>\n", | |
" <td>3G</td>\n", | |
" <td>595</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>ROB</td>\n", | |
" <td>1063</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Liberia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>190</th>\n", | |
" <td>49320</td>\n", | |
" <td>SD</td>\n", | |
" <td>4521</td>\n", | |
" <td>NDJ</td>\n", | |
" <td>999</td>\n", | |
" <td>KAN</td>\n", | |
" <td>270</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>AB6</td>\n", | |
" <td>Chad</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>191</th>\n", | |
" <td>50627</td>\n", | |
" <td>SS</td>\n", | |
" <td>1908</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>ORY</td>\n", | |
" <td>1386</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>333 330</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>France</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>192</th>\n", | |
" <td>50636</td>\n", | |
" <td>SS</td>\n", | |
" <td>1908</td>\n", | |
" <td>ORY</td>\n", | |
" <td>1386</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>333 330</td>\n", | |
" <td>France</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>193</th>\n", | |
" <td>51417</td>\n", | |
" <td>SV</td>\n", | |
" <td>4533</td>\n", | |
" <td>JED</td>\n", | |
" <td>2072</td>\n", | |
" <td>KAN</td>\n", | |
" <td>270</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>74E</td>\n", | |
" <td>Saudi Arabia</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>194</th>\n", | |
" <td>51456</td>\n", | |
" <td>SV</td>\n", | |
" <td>4533</td>\n", | |
" <td>KAN</td>\n", | |
" <td>270</td>\n", | |
" <td>JED</td>\n", | |
" <td>2072</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>74E</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Saudi Arabia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>195</th>\n", | |
" <td>52328</td>\n", | |
" <td>TK</td>\n", | |
" <td>4951</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>IST</td>\n", | |
" <td>1701</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>739</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Turkey</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>196</th>\n", | |
" <td>52550</td>\n", | |
" <td>TK</td>\n", | |
" <td>4951</td>\n", | |
" <td>IST</td>\n", | |
" <td>1701</td>\n", | |
" <td>KAN</td>\n", | |
" <td>270</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>738 739</td>\n", | |
" <td>Turkey</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>197</th>\n", | |
" <td>52577</td>\n", | |
" <td>TK</td>\n", | |
" <td>4951</td>\n", | |
" <td>IST</td>\n", | |
" <td>1701</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>739</td>\n", | |
" <td>Turkey</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>198</th>\n", | |
" <td>52674</td>\n", | |
" <td>TK</td>\n", | |
" <td>4951</td>\n", | |
" <td>KAN</td>\n", | |
" <td>270</td>\n", | |
" <td>NDJ</td>\n", | |
" <td>999</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>738</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Chad</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>199</th>\n", | |
" <td>52711</td>\n", | |
" <td>TK</td>\n", | |
" <td>4951</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>IST</td>\n", | |
" <td>1701</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>739</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Turkey</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>200</th>\n", | |
" <td>53623</td>\n", | |
" <td>TP</td>\n", | |
" <td>4869</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>LIS</td>\n", | |
" <td>1638</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319 320</td>\n", | |
" <td>Mali</td>\n", | |
" <td>Portugal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>201</th>\n", | |
" <td>53642</td>\n", | |
" <td>TP</td>\n", | |
" <td>4869</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>LIS</td>\n", | |
" <td>1638</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>321</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Portugal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>202</th>\n", | |
" <td>53688</td>\n", | |
" <td>TP</td>\n", | |
" <td>4869</td>\n", | |
" <td>LIS</td>\n", | |
" <td>1638</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>319 320</td>\n", | |
" <td>Portugal</td>\n", | |
" <td>Mali</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>203</th>\n", | |
" <td>53700</td>\n", | |
" <td>TP</td>\n", | |
" <td>4869</td>\n", | |
" <td>LIS</td>\n", | |
" <td>1638</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>321</td>\n", | |
" <td>Portugal</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>204</th>\n", | |
" <td>54102</td>\n", | |
" <td>TU</td>\n", | |
" <td>4870</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>TUN</td>\n", | |
" <td>287</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>320</td>\n", | |
" <td>Mali</td>\n", | |
" <td>Tunisia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>205</th>\n", | |
" <td>54126</td>\n", | |
" <td>TU</td>\n", | |
" <td>4870</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>TUN</td>\n", | |
" <td>287</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>320 32A</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>Tunisia</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>206</th>\n", | |
" <td>54201</td>\n", | |
" <td>TU</td>\n", | |
" <td>4870</td>\n", | |
" <td>TUN</td>\n", | |
" <td>287</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>32A</td>\n", | |
" <td>Tunisia</td>\n", | |
" <td>Mali</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>207</th>\n", | |
" <td>54207</td>\n", | |
" <td>TU</td>\n", | |
" <td>4870</td>\n", | |
" <td>TUN</td>\n", | |
" <td>287</td>\n", | |
" <td>DKR</td>\n", | |
" <td>1084</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>320 32A</td>\n", | |
" <td>Tunisia</td>\n", | |
" <td>Senegal</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>208</th>\n", | |
" <td>56782</td>\n", | |
" <td>UA</td>\n", | |
" <td>5209</td>\n", | |
" <td>IAH</td>\n", | |
" <td>3550</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>788</td>\n", | |
" <td>United States</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>209</th>\n", | |
" <td>57067</td>\n", | |
" <td>UA</td>\n", | |
" <td>5209</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>IAH</td>\n", | |
" <td>3550</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>788</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>United States</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>210</th>\n", | |
" <td>62501</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>ABV</td>\n", | |
" <td>260</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>CR9</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>211</th>\n", | |
" <td>62515</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>ACC</td>\n", | |
" <td>248</td>\n", | |
" <td>ABV</td>\n", | |
" <td>260</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>CR9</td>\n", | |
" <td>Ghana</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>212</th>\n", | |
" <td>62533</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>73G</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>213</th>\n", | |
" <td>62537</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>JFK</td>\n", | |
" <td>3797</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>Y</td>\n", | |
" <td>0</td>\n", | |
" <td>345</td>\n", | |
" <td>United States</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>214</th>\n", | |
" <td>62552</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>FNA</td>\n", | |
" <td>1059</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>73G</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Sierra Leone</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>215</th>\n", | |
" <td>62553</td>\n", | |
" <td>W3</td>\n", | |
" <td>407</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>JFK</td>\n", | |
" <td>3797</td>\n", | |
" <td>Y</td>\n", | |
" <td>0</td>\n", | |
" <td>345</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>United States</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>216</th>\n", | |
" <td>63132</td>\n", | |
" <td>WB</td>\n", | |
" <td>4292</td>\n", | |
" <td>KGL</td>\n", | |
" <td>1165</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>73W 738</td>\n", | |
" <td>Rwanda</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>217</th>\n", | |
" <td>63139</td>\n", | |
" <td>WB</td>\n", | |
" <td>4292</td>\n", | |
" <td>LOS</td>\n", | |
" <td>273</td>\n", | |
" <td>KGL</td>\n", | |
" <td>1165</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>738 73W</td>\n", | |
" <td>Nigeria</td>\n", | |
" <td>Rwanda</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>218</th>\n", | |
" <td>67449</td>\n", | |
" <td>ZI</td>\n", | |
" <td>21</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>ORY</td>\n", | |
" <td>1386</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>320</td>\n", | |
" <td>Mali</td>\n", | |
" <td>France</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>219</th>\n", | |
" <td>67490</td>\n", | |
" <td>ZI</td>\n", | |
" <td>21</td>\n", | |
" <td>ORY</td>\n", | |
" <td>1386</td>\n", | |
" <td>BKO</td>\n", | |
" <td>1044</td>\n", | |
" <td>NaN</td>\n", | |
" <td>0</td>\n", | |
" <td>320</td>\n", | |
" <td>France</td>\n", | |
" <td>Mali</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" <td>-1</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>220 rows \u00d7 15 columns</p>\n", | |
"</div>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 9, | |
"text": [ | |
" Unnamed: 0 Airline AirlineID SourceAirport SourceAirportID DestAirport \\\n", | |
"0 84 2J 470 BKO 1044 ABJ \n", | |
"1 85 2J 470 BKO 1044 DKR \n", | |
"2 86 2J 470 BKO 1044 OUA \n", | |
"3 91 2J 470 DKR 1084 BKO \n", | |
"4 92 2J 470 DKR 1084 OUA \n", | |
"5 97 2J 470 OUA 246 BKO \n", | |
"6 100 2J 470 OUA 246 DKR \n", | |
"7 282 3G 595 ACC 248 DKR \n", | |
"8 283 3G 595 ACC 248 LOS \n", | |
"9 284 3G 595 ACC 248 ROB \n", | |
"10 287 3G 595 BJL 1050 DKR \n", | |
"11 288 3G 595 BJL 1050 FNA \n", | |
"12 289 3G 595 CKY 4162 OXB \n", | |
"13 290 3G 595 DKR 1084 ACC \n", | |
"14 291 3G 595 DKR 1084 BJL \n", | |
"15 292 3G 595 DKR 1084 DLA \n", | |
"16 293 3G 595 DKR 1084 FNA \n", | |
"17 294 3G 595 DKR 1084 LOS \n", | |
"18 295 3G 595 DKR 1084 OXB \n", | |
"19 296 3G 595 DLA 897 DKR \n", | |
"20 297 3G 595 DLA 897 LOS \n", | |
"21 298 3G 595 FNA 1059 BJL \n", | |
"22 299 3G 595 FNA 1059 DKR \n", | |
"23 300 3G 595 FNA 1059 LGW \n", | |
"24 301 3G 595 FNA 1059 ROB \n", | |
"25 302 3G 595 LGW 502 FNA \n", | |
"26 303 3G 595 LOS 273 ACC \n", | |
"27 304 3G 595 LOS 273 DKR \n", | |
"28 305 3G 595 LOS 273 DLA \n", | |
"29 306 3G 595 LOS 273 ROB \n", | |
".. ... ... ... ... ... ... \n", | |
"190 49320 SD 4521 NDJ 999 KAN \n", | |
"191 50627 SS 1908 DKR 1084 ORY \n", | |
"192 50636 SS 1908 ORY 1386 DKR \n", | |
"193 51417 SV 4533 JED 2072 KAN \n", | |
"194 51456 SV 4533 KAN 270 JED \n", | |
"195 52328 TK 4951 DKR 1084 IST \n", | |
"196 52550 TK 4951 IST 1701 KAN \n", | |
"197 52577 TK 4951 IST 1701 LOS \n", | |
"198 52674 TK 4951 KAN 270 NDJ \n", | |
"199 52711 TK 4951 LOS 273 IST \n", | |
"200 53623 TP 4869 BKO 1044 LIS \n", | |
"201 53642 TP 4869 DKR 1084 LIS \n", | |
"202 53688 TP 4869 LIS 1638 BKO \n", | |
"203 53700 TP 4869 LIS 1638 DKR \n", | |
"204 54102 TU 4870 BKO 1044 TUN \n", | |
"205 54126 TU 4870 DKR 1084 TUN \n", | |
"206 54201 TU 4870 TUN 287 BKO \n", | |
"207 54207 TU 4870 TUN 287 DKR \n", | |
"208 56782 UA 5209 IAH 3550 LOS \n", | |
"209 57067 UA 5209 LOS 273 IAH \n", | |
"210 62501 W3 407 ABV 260 ACC \n", | |
"211 62515 W3 407 ACC 248 ABV \n", | |
"212 62533 W3 407 FNA 1059 LOS \n", | |
"213 62537 W3 407 JFK 3797 LOS \n", | |
"214 62552 W3 407 LOS 273 FNA \n", | |
"215 62553 W3 407 LOS 273 JFK \n", | |
"216 63132 WB 4292 KGL 1165 LOS \n", | |
"217 63139 WB 4292 LOS 273 KGL \n", | |
"218 67449 ZI 21 BKO 1044 ORY \n", | |
"219 67490 ZI 21 ORY 1386 BKO \n", | |
"\n", | |
" DestAirportID Codeshare Stops Equipment SourceCountry DestCountry \\\n", | |
"0 253 NaN 0 M87 Mali Cote d'Ivoire \n", | |
"1 1084 NaN 0 M87 Mali Senegal \n", | |
"2 246 NaN 0 CRJ Mali Burkina Faso \n", | |
"3 1044 NaN 0 M87 Senegal Mali \n", | |
"4 246 NaN 0 M87 Senegal Burkina Faso \n", | |
"5 1044 NaN 0 M87 CRJ Burkina Faso Mali \n", | |
"6 1084 NaN 0 M87 Burkina Faso Senegal \n", | |
"7 1084 NaN 0 319 Ghana Senegal \n", | |
"8 273 NaN 0 319 Ghana Nigeria \n", | |
"9 1063 NaN 0 319 Ghana Liberia \n", | |
"10 1084 NaN 0 319 Gambia Senegal \n", | |
"11 1059 NaN 0 319 Gambia Sierra Leone \n", | |
"12 5665 NaN 0 319 Guinea Guinea-Bissau \n", | |
"13 248 NaN 0 319 Senegal Ghana \n", | |
"14 1050 NaN 0 319 Senegal Gambia \n", | |
"15 897 NaN 0 319 Senegal Cameroon \n", | |
"16 1059 NaN 0 319 Senegal Sierra Leone \n", | |
"17 273 NaN 0 319 Senegal Nigeria \n", | |
"18 5665 NaN 0 319 Senegal Guinea-Bissau \n", | |
"19 1084 NaN 0 319 Cameroon Senegal \n", | |
"20 273 NaN 0 319 Cameroon Nigeria \n", | |
"21 1050 NaN 0 319 Sierra Leone Gambia \n", | |
"22 1084 NaN 0 319 Sierra Leone Senegal \n", | |
"23 502 NaN 0 319 Sierra Leone United Kingdom \n", | |
"24 1063 NaN 0 319 Sierra Leone Liberia \n", | |
"25 1059 NaN 0 319 United Kingdom Sierra Leone \n", | |
"26 248 NaN 0 319 Nigeria Ghana \n", | |
"27 1084 NaN 0 319 Nigeria Senegal \n", | |
"28 897 NaN 0 319 Nigeria Cameroon \n", | |
"29 1063 NaN 0 319 Nigeria Liberia \n", | |
".. ... ... ... ... ... ... \n", | |
"190 270 NaN 0 AB6 Chad Nigeria \n", | |
"191 1386 NaN 0 333 330 Senegal France \n", | |
"192 1084 NaN 0 333 330 France Senegal \n", | |
"193 270 NaN 0 74E Saudi Arabia Nigeria \n", | |
"194 2072 NaN 0 74E Nigeria Saudi Arabia \n", | |
"195 1701 NaN 0 739 Senegal Turkey \n", | |
"196 270 NaN 0 738 739 Turkey Nigeria \n", | |
"197 273 NaN 0 739 Turkey Nigeria \n", | |
"198 999 NaN 0 738 Nigeria Chad \n", | |
"199 1701 NaN 0 739 Nigeria Turkey \n", | |
"200 1638 NaN 0 319 320 Mali Portugal \n", | |
"201 1638 NaN 0 321 Senegal Portugal \n", | |
"202 1044 NaN 0 319 320 Portugal Mali \n", | |
"203 1084 NaN 0 321 Portugal Senegal \n", | |
"204 287 NaN 0 320 Mali Tunisia \n", | |
"205 287 NaN 0 320 32A Senegal Tunisia \n", | |
"206 1044 NaN 0 32A Tunisia Mali \n", | |
"207 1084 NaN 0 320 32A Tunisia Senegal \n", | |
"208 273 NaN 0 788 United States Nigeria \n", | |
"209 3550 NaN 0 788 Nigeria United States \n", | |
"210 248 NaN 0 CR9 Nigeria Ghana \n", | |
"211 260 NaN 0 CR9 Ghana Nigeria \n", | |
"212 273 NaN 0 73G Sierra Leone Nigeria \n", | |
"213 273 Y 0 345 United States Nigeria \n", | |
"214 1059 NaN 0 73G Nigeria Sierra Leone \n", | |
"215 3797 Y 0 345 Nigeria United States \n", | |
"216 273 NaN 0 73W 738 Rwanda Nigeria \n", | |
"217 1165 NaN 0 738 73W Nigeria Rwanda \n", | |
"218 1386 NaN 0 320 Mali France \n", | |
"219 1044 NaN 0 320 France Mali \n", | |
"\n", | |
" MeanPeriod StdPeriod Seats \n", | |
"0 -1 -1 -1 \n", | |
"1 -1 -1 -1 \n", | |
"2 -1 -1 -1 \n", | |
"3 -1 -1 -1 \n", | |
"4 -1 -1 -1 \n", | |
"5 -1 -1 -1 \n", | |
"6 -1 -1 -1 \n", | |
"7 -1 -1 -1 \n", | |
"8 -1 -1 -1 \n", | |
"9 -1 -1 -1 \n", | |
"10 -1 -1 -1 \n", | |
"11 -1 -1 -1 \n", | |
"12 -1 -1 -1 \n", | |
"13 -1 -1 -1 \n", | |
"14 -1 -1 -1 \n", | |
"15 -1 -1 -1 \n", | |
"16 -1 -1 -1 \n", | |
"17 -1 -1 -1 \n", | |
"18 -1 -1 -1 \n", | |
"19 -1 -1 -1 \n", | |
"20 -1 -1 -1 \n", | |
"21 -1 -1 -1 \n", | |
"22 -1 -1 -1 \n", | |
"23 -1 -1 -1 \n", | |
"24 -1 -1 -1 \n", | |
"25 -1 -1 -1 \n", | |
"26 -1 -1 -1 \n", | |
"27 -1 -1 -1 \n", | |
"28 -1 -1 -1 \n", | |
"29 -1 -1 -1 \n", | |
".. ... ... ... \n", | |
"190 -1 -1 -1 \n", | |
"191 -1 -1 -1 \n", | |
"192 -1 -1 -1 \n", | |
"193 -1 -1 -1 \n", | |
"194 -1 -1 -1 \n", | |
"195 -1 -1 -1 \n", | |
"196 -1 -1 -1 \n", | |
"197 -1 -1 -1 \n", | |
"198 -1 -1 -1 \n", | |
"199 -1 -1 -1 \n", | |
"200 -1 -1 -1 \n", | |
"201 -1 -1 -1 \n", | |
"202 -1 -1 -1 \n", | |
"203 -1 -1 -1 \n", | |
"204 -1 -1 -1 \n", | |
"205 -1 -1 -1 \n", | |
"206 -1 -1 -1 \n", | |
"207 -1 -1 -1 \n", | |
"208 -1 -1 -1 \n", | |
"209 -1 -1 -1 \n", | |
"210 -1 -1 -1 \n", | |
"211 -1 -1 -1 \n", | |
"212 -1 -1 -1 \n", | |
"213 -1 -1 -1 \n", | |
"214 -1 -1 -1 \n", | |
"215 -1 -1 -1 \n", | |
"216 -1 -1 -1 \n", | |
"217 -1 -1 -1 \n", | |
"218 -1 -1 -1 \n", | |
"219 -1 -1 -1 \n", | |
"\n", | |
"[220 rows x 15 columns]" | |
] | |
} | |
], | |
"prompt_number": 9 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"len(rel_routes.drop_duplicates(subset=['SourceAirport','DestAirport']))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 10, | |
"text": [ | |
"220" | |
] | |
} | |
], | |
"prompt_number": 10 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment