Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. df[16820:16830]
  2. data0 start_stop
  3. 16820 1 0
  4. 16821 1 1
  5. 16822 1 0
  6. 16823 1 0
  7. 16824 1 0
  8. 16825 1 -1
  9. 16826 0 0
  10. 16827 0 0
  11. 16828 1 1
  12. 16829 0 0
  13. 16830 1 1
  14.  
  15. data0 start_stop valid
  16. 16820 1 0 False
  17. 16821 1 1 True
  18. 16822 1 0 True
  19. 16823 1 0 True
  20. 16824 1 0 True
  21. 16825 1 -1 False
  22. 16826 0 0 False
  23. 16827 0 0 False
  24. 16828 1 1 True
  25. 16829 0 0 True
  26. 16830 1 -1 False
  27. ...
  28.  
  29. df['valid'] = 'True'; df.loc[df['data0'] > df['data1'],'valid'] = 'False'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement