Skip to content

rosnk/python-csv-to-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This python is to insert bulk mysql data from csv file

Prerequisit: mysql schema needs to be in place.

Uses: replace path to .csv with open('/path/to/file.csv', 'r') as csvfile:

replace table_name with mysql table name replace table field name in place of field1,field2 and corrosponding %s,%s

cursor.executemany( 'INSERT INTO table_name (field1,field2) VALUES (%s,%s)', data )

About

import csv file to mysql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages