'how to add the value from the next row to the current row
Solution 1:[1]
I am not sure if the only thing requested is to concatenate the trip ID of the next row to the current row but if it is, would you consider using shift(-1) ?
df['newtrip']=df['trip']+'-'+df['trip'].shift(-1)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Daniel Weigel |


