Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 366 Bytes

exporting-data-from-python.md

File metadata and controls

26 lines (16 loc) · 366 Bytes
layout element title language
page
notes
Exporting data from Python
Python

List of lists into CSV file

import csv

output_file = open('C:path/to/file', 'w')

datawriter = csv.writer(output_file)

datawriter.writerows(data)

output_file.close()

 

Numpy array into CSV file

import numpy

numpy.savetxt('C:path/to/file', X, delimiter = ',')