searchAirportInfoByIATA()

Programming Language: Python 3 (As of Jan 2022)

Description


Travel() must be initialized first before calling searchAirportInfoByIATA(). Using Pandas, it will read the database that has 9300 airports and search it by the desired IATA code you used to intialize Travel().

Parameters


self (None; however read description)

  Value of this must be a string of a correctly spelled location.

  location string needs to be a IATA Code

Calling Example


        
            LAX.searchAirportInfoByAirportName()
        
        
    

Class Code


        
            def searchAirportInfoByIATA(self):
              data = pd.read_excel(Global Airport Database.xlsx", sheet_name= "GlobalAirportDatabase")
              df = pd.DataFrame(data)
              print (df.loc[df["IATA"].str.contains(self.location.upper())])
              print("\n")
        
    

Required Database of 9300 Airports


Download Database