def read_and_write_file(json_file_path, csv_file_path, column_names):
 with open(csv_file_path, 'wb+') as fout:
  csv_file = csv.writer(fout)
  csv_file.writerow(list(column_names))
  with open(json_file_path) as fin:
   for line in fin:
    line_contents = json.loads(line)
    csv_file.writerow(get_row(line_contents, column_names))

def read_and_write_file ( json_file_path , csv_file_path , column_names ) : with open ( csv_file_path , 'wb+' ) as fout : csv_file = csv . writer ( fout ) csv_file . writerow ( list ( column_names ) ) with open ( json_file_path ) as fin : for line in fin : line_contents = json . loads ( line ) csv_file . writerow ( get_row ( line_contents , column_names ) )
read in the json dataset file and write it out to a csv file .