Skip to content

Instantly share code, notes, and snippets.

@powersa
Created December 18, 2014 02:56
Show Gist options
  • Save powersa/8ef31b502558bcdcffbc to your computer and use it in GitHub Desktop.
Save powersa/8ef31b502558bcdcffbc to your computer and use it in GitHub Desktop.
A function that writes a csv
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