Created
December 18, 2014 02:56
-
-
Save powersa/8ef31b502558bcdcffbc to your computer and use it in GitHub Desktop.
A function that writes a csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
# out_file is a file path and out is an array of arrays of the data you want to write | |
def write_data_to_csv(out_file, out): | |
with open(out_file, "w") as f: | |
wr = csv.writer(f, delimiter='\t') | |
for row in out: | |
wr.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment