Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timestamp,stockname,total volume traded
- 11:00,A,100
- 11:00,B,500
- 11:01,A,150
- 11:01,B,600
- 11:02,A,200
- 11:02,B,650
- timestamp, stock,total volume, change in volume
- 11:00,A,100,NaN
- 11:00,B,500,NAN
- 11:01,A,150,50
- 11:01,B,600,100
- 11:02,A,200,50
- 11:03,B,650,50
- df['ChangeVol'] = df['TotalVol'] - df['TotalVol'].shift(1)
Add Comment
Please, Sign In to add comment