cjl wrote:
> Group:
>
> I'm new to python and new to mysql.
>
> I have a csv file that is about 200,000 rows that I want to add to a
> mysql database. Yes, I know that I can do this directly from the
> mysql command line, but I am doing it through a python script so that
> I can munge the data b
On May 20, 5:55 pm, cjl <[EMAIL PROTECTED]> wrote:
...snip...
> conn = MySQLdb.connect(db="database", host="localhost", user="root",
> passwd="password")
> c = conn.cursor()
>
> reader = csv.reader(open(sys.argv[1]))
> for row in reader:
> data1, data2, data3, data4 = row
> data = (data1,da
Group:
I'm new to python and new to mysql.
I have a csv file that is about 200,000 rows that I want to add to a
mysql database. Yes, I know that I can do this directly from the
mysql command line, but I am doing it through a python script so that
I can munge the data before adding it.
I have th