Guest User

Untitled

a guest
Jun 26th, 2018
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. [{"@context":"ABC","entity":"PQR","URL":"abc@yahoo.com"}]
  2. [{"@context":"RST","entity":"UVW","URL":"efg@gmail.com"}]
  3. .............
  4. ............
  5. ............
  6.  
  7. @context entity URL
  8. ABC PQR abc@yahoo.com
  9. RST UVW efg@gmail.com
  10. ... ... .......
  11. ... ... .......
  12.  
  13. from itertools import chain
  14.  
  15. L = [[{"@context":"ABC","entity":"PQR","URL":"abc@yahoo.com"}],
  16. [{"@context":"RST","entity":"UVW","URL":"efg@gmail.com"}]]
  17.  
  18. df = pd.DataFrame(list(chain.from_iterable(L)))
  19. print (df)
  20. @context URL entity
  21. 0 ABC abc@yahoo.com PQR
  22. 1 RST efg@gmail.com UVW
Add Comment
Please, Sign In to add comment