I suspect this is a common problem, but I counldn\'t seem to locate the answer. I am trying to remove all commas from a csv file and replace them with colons. I would normal
Assuming that the CSV is comma delimited, and you want to replace commas in each entry, I believe the issue is replacing the wrong item:
for rows in reader: for parsed_item in rows: parsed_item = parsed_item.replace(',', ':') # Change rows to parsed_item writer.writerow(parsed_item)