Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. cols = [*df]
  2. with open('test.txt', 'w') as f:
  3.     for data in df.to_numpy(copy=False).tolist():
  4.         json.dump(dict(zip(cols, data)), f)
  5.         f.write('\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement