Python Enclosing Words With Quotes In A String -
I'm opening a CSV file for Python that looks like this:
jamie, london How do I add words to citations in the CSV file, it looks like: I have just the basic content:
filemame = "data.csv" file = open (file name, "r") Not sure what I will do next.
If you are just trying to change the file, then QUOTE_ALL Use, like this: as output ('out.csv', 'w' ): Author for the line in reader = csv.reader (input) writer = csv reader (output, delimiter = ',', quoting = csv.QUOTE_ALL): author.writerow (line) < / div>
Comments
Post a Comment