0

I have an airline dataset and in one month the airport codes are coded differently. I found a source to correct it, but can't seem to get it to work.

airline_df = pd.DataFrame({'airport':['ORD', 'LAS', 'BOS', 10721, 12889]})

airport_code = pd.DataFrame({'airport':['BOS', 'LAS', 'ORD'], 'airport_code':[10721, 12889, 13930]}

I also created a dictionary of the code:airport using

code_dict = airport_codes.set_index('airport_code').to_dict()['airport']

I am trying to replace all the airport values that are numbers with the airport name.

0 Answers0