searchAirportInfoByAirportName()

Programming Language: Python 3 (As of Jan 2022)

Description


Travel() must be initialized first before calling searchAirportInfoByAirportName(). Using Pandas, it will read the database that has 9300 airports and search it by the desired airport name 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 Airport Name

Calling Example


        
            jiamusi.searchAirportInfoByAirportName()
        
        
    

Class Code


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

Required Database of 9300 Airports


Download Database