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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -