Guest User

Untitled

a guest
Mar 18th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def func():
  2. return (df['Gold']-df['Gold.1']).idxmax()
  3.  
  4. CPU times: user 4.56 ms, sys: 136 µs, total: 4.7 ms
  5. Wall time: 4.09 ms
  6.  
  7. def func1( arr, arr1 ):
  8. sum = 0
  9. ind = 0
  10. t = 0
  11. for i,v in zip(arr, arr1) :
  12. if abs(i - v) > sum :
  13. sum = i
  14. ind = t
  15. t += 1
  16. return df.index[ind]
  17.  
  18. CPU times: user 263 µs, sys: 63 µs, total: 326 µs
  19. Wall time: 333 µs
Add Comment
Please, Sign In to add comment