Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. name number ID code
  2. 1111 2 3 ['%AB','$12','&FD']
  3.  
  4. name number ID to from
  5. 1111 2 3 %AB $12
  6. 1111 2 3 %AB &FD
  7. 1111 2 3 $12 &FD
  8.  
  9. a = [y for x in df[['code']].stack() for y in combinations(x,2)]
  10. df[['to','from']] = a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement