Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 386 Bytes

exporting-data-from-python.md

File metadata and controls

25 lines (20 loc) · 386 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 = ',')