The HTML tables are likely containing non-breaking spaces.
Try:
flight_details = df.iloc[index, 5].replace('\xa0', ' ').strip()