Spaces:
Build error
Build error
elli-teu
commited on
Commit
·
7fbd224
1
Parent(s):
d18dba3
Sort buses
Browse files
app.py
CHANGED
|
@@ -326,6 +326,8 @@ def drop_the_duplicates(df):
|
|
| 326 |
df["previous"] = df["datetime"].shift(1)
|
| 327 |
df = df[((df["datetime"] - df["previous"]) > timedelta(minutes=3)) | (df["previous"].isna())]
|
| 328 |
|
|
|
|
|
|
|
| 329 |
return df
|
| 330 |
|
| 331 |
|
|
@@ -376,7 +378,7 @@ def main():
|
|
| 376 |
# Create a multiselect dropdown in the sidebar
|
| 377 |
search = st.sidebar.selectbox(
|
| 378 |
"Search for your bus number:",
|
| 379 |
-
options=short_bus,
|
| 380 |
help="Select one bus to view details."
|
| 381 |
)
|
| 382 |
|
|
|
|
| 326 |
df["previous"] = df["datetime"].shift(1)
|
| 327 |
df = df[((df["datetime"] - df["previous"]) > timedelta(minutes=3)) | (df["previous"].isna())]
|
| 328 |
|
| 329 |
+
#df = df.drop_duplicates(["trip_id", "stop_name"])
|
| 330 |
+
|
| 331 |
return df
|
| 332 |
|
| 333 |
|
|
|
|
| 378 |
# Create a multiselect dropdown in the sidebar
|
| 379 |
search = st.sidebar.selectbox(
|
| 380 |
"Search for your bus number:",
|
| 381 |
+
options=short_bus.sort(),
|
| 382 |
help="Select one bus to view details."
|
| 383 |
)
|
| 384 |
|