Another speed improvement to the interpolator function. This change fully vectorizes the interpolation: a DataFrame is created in which each column represents a unique_trip_id and the index is stop_sequence. Running DataFrame.interpolate() interpolates values on all trips at once, and the values are merged back.
I added a few unit tests for this function as well. @sablanchard it would be helpful to look over the return values to make sure they're behaving as intended.
Another speed improvement to the interpolator function. This change fully vectorizes the interpolation: a DataFrame is created in which each column represents a
unique_trip_id
and the index isstop_sequence
. RunningDataFrame.interpolate()
interpolates values on all trips at once, and the values are merged back.I added a few unit tests for this function as well. @sablanchard it would be helpful to look over the return values to make sure they're behaving as intended.