2
I am conducting a research using pandas and need to infer the time between two buses based on their start times (start_time). For this I have grouped in my dataframe a field for itinerary and Leg(otp_itinerary_id and otp_leg_id,respectively). And the bus schedules are always on the even Legs.
So I wanted help to perform a subtraction of the bt_start_time of even Legs.
Follow the image for more details. If anyone can help me, I’d really appreciate it.
thanks @Murilo-portugal I managed to apply the itertuples to the context of my problem and managed to solve it.
– Hector Medeiros