Spaces:
Runtime error
Runtime error
Commit ·
566ce7a
1
Parent(s): ca842ee
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def get_specific_flights(day, max_delay, departure_hour, ampm, weather, destinat
|
|
| 41 |
destinations = [dest for dest in destinations if dest not in ["That's a reason why I travel alone...", "I prefer not to say"]]
|
| 42 |
|
| 43 |
# Select only flight during the same departure hour
|
| 44 |
-
df['departure_hour'] = df['
|
| 45 |
df = df[df['departure_hour'] == departure_hour].drop(columns=['departure_hour'])
|
| 46 |
|
| 47 |
# Convert time columns to datetime objects
|
|
|
|
| 41 |
destinations = [dest for dest in destinations if dest not in ["That's a reason why I travel alone...", "I prefer not to say"]]
|
| 42 |
|
| 43 |
# Select only flight during the same departure hour
|
| 44 |
+
df['departure_hour'] = df['ontime'].str.split(':').str[0].astype(int)
|
| 45 |
df = df[df['departure_hour'] == departure_hour].drop(columns=['departure_hour'])
|
| 46 |
|
| 47 |
# Convert time columns to datetime objects
|