You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sys.exit("** Usage: ./formatCSV <infile> <p|np> (option to print modified lines or not) <ovw|n> (option to overwrite existing file, else create new one named \"name_2\" **")
name = sys.argv[1]
p=False
ovw=False
if sys.argv[2]=="p":
p=True
if sys.argv[3]=="ovw":
ovw=True
f = open(name, 'rb') # opens the csv file
w = open(name+'_2', 'wb')
writer = csv.writer(w)
i = 0
try:
reader = csv.reader(f) # creates the reader object
for row in reader: # iterates the rows of the file in orders