Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import csv
- from csv import DictWriter
- data = []
- output_file = open('simran.csv', 'w')
- writer = csv.writer(output_file)
- with open("simran.json") as source_file:
- for line in source_file:
- data.append(json.loads(line))
- for comments in data:
- writer.writerow(comments['text'])
Add Comment
Please, Sign In to add comment