From 98a0a256c40701133aa3144fda8e2617d3281039 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Tue, 26 Nov 2024 18:49:25 -0500 Subject: [PATCH] Use dateint --- mbta-performance/chalicelib/lamp/ingest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mbta-performance/chalicelib/lamp/ingest.py b/mbta-performance/chalicelib/lamp/ingest.py index 0683de2..6bf8627 100644 --- a/mbta-performance/chalicelib/lamp/ingest.py +++ b/mbta-performance/chalicelib/lamp/ingest.py @@ -209,8 +209,8 @@ def ingest_pq_file(pq_df: pd.DataFrame, service_date: date) -> pd.DataFrame: # from that which GTFS reports in its schedule. Replace for better schedule matching. pq_df["stop_id"] = pq_df["stop_id"].replace(STOP_ID_NUMERIC_MAP) # drop non-revenue producing events - cutoff_date = pd.Timestamp("2023-11-30", tz=EASTERN_TIME) - pq_df = pq_df[~((pq_df["trip_id"].str.startswith(TRIP_IDS_TO_DROP)) & (pq_df["event_time"] < cutoff_date))] + cutoff_date = format_dateint(20231130) + pq_df = pq_df[~((pq_df["trip_id"].str.startswith(TRIP_IDS_TO_DROP)) & (pq_df["service_date"] < cutoff_date))] processed_daily_events = _process_arrival_departure_times(pq_df) processed_daily_events = processed_daily_events[processed_daily_events["stop_id"].notna()]