Skip to content

Commit

Permalink
fix: moved reset_index to return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRec committed Feb 19, 2024
1 parent 146fff8 commit 6c9b359
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transport_performance/gtfs/multi_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6c9b359

Please sign in to comment.