Go to the documentation of this file.00001
00002 import sys
00003 import csv
00004
00005 def extract_data(files):
00006 data = []
00007 for data_file in files:
00008 with open(data_file, 'rb') as f:
00009 reader = csv.reader(f)
00010 for row in reader:
00011 data.append(row)
00012 print "Processing: %s , %s rows" %(data_file, reader.line_num)
00013 print "Final Length: ", len(data)
00014 return data
00015
00016 if __name__=='__main__':
00017 files = sys.argv[1:]
00018 data = extract_data(files)
00019 with open('condensed_data.csv', 'wb') as f_out:
00020 writer = csv.writer(f_out)
00021 writer.writerows(data)