From 6c9b359d5b8a2b2d71a849b5168e22b3e2173e64 Mon Sep 17 00:00:00 2001 From: Sergio Recio Date: Mon, 19 Feb 2024 09:22:33 +0000 Subject: [PATCH] fix: moved reset_index to return statement --- src/transport_performance/gtfs/multi_validation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transport_performance/gtfs/multi_validation.py b/src/transport_performance/gtfs/multi_validation.py index 3759c4c4..84319b2b 100644 --- a/src/transport_performance/gtfs/multi_validation.py +++ b/src/transport_performance/gtfs/multi_validation.py @@ -492,10 +492,10 @@ def _summarise_core( # Always sort by day so that route_type sorts are more organised trip_counts = self.instances[0]._order_dataframe_by_day(trip_counts) if sort_by_route_type: - trip_counts = trip_counts.sort_values("route_type").reset_index() + trip_counts = trip_counts.sort_values("route_type") if to_days: trip_counts = self._summary_col_sorter(trip_counts) - return trip_counts + return trip_counts.reset_index(drop=True) def summarise_trips( self,