2009/1/13 Judith Flores :
> Hello,
Hi Judith,
> 1. When I run the code above for the first time, the contents of the
> pre-existing file disappear, if I
> run the script a second time, now I can see the value of x.
This is a consequence of this line:
> outfile=open('template.csv','w') # Th
"Judith Flores" wrote
I have been struggling a while trying to figure out how to modify
a csv
file using the csv.DictWriter class. Let's suppose I have the
following code:
I have never used DictWriter but...
outfile=open('template.csv','w') # This is a pre-existing file
Opening a
Hello,
I have been struggling a while trying to figure out how to modify a csv file
using the csv.DictWriter class. Let's suppose I have the following code:
import csv
outfile=open('template.csv','w') # This is a pre-existing file that
contains 3 variables (3 columns). The variables will