Re: [Tutor] Rapidly Importing CSVs with Python into MySQL

2012-07-21 Thread Alan Gauld
On 20/07/12 21:34, Fred G wrote: Hi-- This question has to do with MySQL but is fundamentally a python question, so apologies if it seems tangential initially... I've written a long python file that creates all the tables in database To be honest I'd normally do that by writing a SQL file and

Re: [Tutor] Rapidly Importing CSVs with Python into MySQL

2012-07-20 Thread Walter Prins
Hi Fred, On 20 July 2012 21:34, Fred G wrote: > Here is the first few lines: Rather than paraphrase and omit details that might be relevant to the problem you're having, please try to whittle down your code to a bare test program that is runnable by us as-is that demonstrates your problem. Th

[Tutor] Rapidly Importing CSVs with Python into MySQL

2012-07-20 Thread Fred G
Hi-- This question has to do with MySQL but is fundamentally a python question, so apologies if it seems tangential initially... I've written a long python file that creates all the tables in database UN. Here is the first few lines: import MySQLdb as mysql statement = """CREATE DATABASE UN""" d