with open('test.csv', 'wb+') as f:
    dict_writer = csv.DictWriter(f, fieldnames=['longitude', 'latitude'])
dict_writer.writeheader()
dict_writer.writerows(rows)
Convert JSON to CSV using Python (Idle)