473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Inserting the contents of csv file using python mysqldb

I have tried both the LOAD DATA and the INSERT methods. I have searched the web for previous (2003, 2005, 2008, etc) similar questions and answers (none of the answers work - I keep getting syntax errors). What is the correct syntax for reading the contents of a csv file and inserting the contents into a mysqldb table? I have python 2.7 loaded on debian-lenny.
Jun 17 '11 #1
1 1654
Mariostg
332 100+
You should really give us the sql statement you used as well as the error message you get.
Jun 22 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Serge Guay | last post by:
I have been trying to print a text file to my printer but the most I have been able to do is print one line. I have been using the following commands. dc = win32ui.CreateDC()...
2
by: adityabhambri | last post by:
HI guys, I am trying to automate some project work which the accounting dept of the company uses. They have to go through multiple steps to achieve the final goal. Is there some way that I can use...
1
by: Denton | last post by:
Hi all: I working in MS window environment. Now I want to use a python script to import some data from CSV file to MDB file. but I have some problems about creating MDB file in DAO. I am using...
0
by: psbasha | last post by:
Hi, Is there any module available to write and read a XML file using Python? Links for the material will help me. Thanks in advance PSB
7
by: parthpatel | last post by:
Hello, I m trying to convert a xls file data into csv type data. Is it possible anyway that i can do this using python coding if yes than plz provide a demo code for this Thanks
8
by: fahadqureshi | last post by:
Hello, I posted here before asking a question about reading excel. Now that the reading problem is solved i am having trouble on how to write to an excel file. This was my code to read the excel...
3
by: sophie_newbie | last post by:
Is there any way to do this directly within python? If not is there any other good way to achieve it? Thanks in advance for any help!
2
by: Krishna | last post by:
I was trying to delete rows in an existing .xls file using python. How do I do that? I was using the following code, it seem to work if I type in python window, but if I save it in text editor and...
10
by: pikkukoira | last post by:
Good day. I have series of data in cvs file like below, 1,,, 1,137.1,1198,1.6 2,159,300,0.4 3,176,253,0.3 4,197,231,0.3 5,198,525,0.7
1
by: new one | last post by:
i want to convert a html file to dom using python
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.