Guest User

Untitled

a guest
Mar 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. For id in total:
  2.  
  3. l= m.groupby(['nodo_1','nodo_2']).size()
  4. n =list(l.index.values)
  5.  
  6. nodo_1 nodo_2 0
  7. E039 J303 5
  8. J00X B829 5
  9. J209 J029 5
  10. K590 K291 5
  11. N925 K590 5
  12. N925 Z119 5
  13. Z119 K590 5
  14.  
  15. for n in c:
  16. d=d.append({'Source':n[0],'Target':n[1],ignore_index=True)
  17. d.to_csv('d.csv')
Add Comment
Please, Sign In to add comment