From 96ba3699d23d8fad93c8794496163f1fd108abd6 Mon Sep 17 00:00:00 2001 From: Jeff Newman Date: Wed, 6 Mar 2024 16:44:14 -0600 Subject: [PATCH] rollback num_escortees fix --- ext-configs/trip_mode_choice_annotate_trips_preprocessor.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext-configs/trip_mode_choice_annotate_trips_preprocessor.csv b/ext-configs/trip_mode_choice_annotate_trips_preprocessor.csv index 755c081..3a86f6b 100644 --- a/ext-configs/trip_mode_choice_annotate_trips_preprocessor.csv +++ b/ext-configs/trip_mode_choice_annotate_trips_preprocessor.csv @@ -19,7 +19,7 @@ Description,Target,Expression ,tour_mode_is_drive_transit,i_tour_mode.isin(I_DRIVE_TRANSIT_MODES) ,tour_mode_is_ride_hail,i_tour_mode.isin(I_RIDE_HAIL_MODES) #,, -,selected_tour_vehicle,"pd.Series(reindex(tours.selected_vehicle, df.tour_id), index=df.index, dtype=tours.selected_vehicle.dtype)" +,selected_tour_vehicle,"reindex(tours.selected_vehicle, df.tour_id)" ,auto_op_cost,"reindex(vehicles.groupby('vehicle_type')['auto_operating_cost'].mean(), pd.Series(selected_tour_vehicle, df.index))" ,auto_op_cost,"np.where(pd.isna(auto_op_cost), costPerMile, auto_op_cost)" ,inbound,~df.outbound @@ -92,4 +92,4 @@ dest terminal time not counted at home,_dest_terminal_time,"np.where(inbound & l #,dist_bike,od_skims['DISTBIKE'] #,dist_only,od_skims['DIST'] # added for school escorting model,, -Number of school children in vehicle on trip,num_escortees,df.escort_participants.fillna('').apply(lambda x: len(x.split('_')) if len(x)>0 else 0) \ No newline at end of file +Number of school children in vehicle on trip,num_escortees,df.escort_participants.fillna('').apply(lambda x: len(x.split('_')))