Skip to content

Workings on pushing data from Excel/CSVs to a database using Python

Notifications You must be signed in to change notification settings

teaganogorman/python-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-mysql

Workings on pushing data from Excel/CSVs to a database using Python Opens and manipulates files and then sends them to a mysql database Currently working for pnpc, parmalat, weather_sa and pvspot

Required modules (must be installed on computer): sqlalchemy, pymysql, pandas

Files to upload must be in the directory specified on line 127 (currently dirname='C:/push_to_db/')

Database info must be on line 142, in the format below:

engine = create_engine('dialect+driver://username:password@host:port/database', echo=False)

(currently engine = create_engine('mysql+pymysql://root:ep101@localhost/ei_db', echo=False))

The majority of the code in this script deals with importing the files and manipulating them into the correct formats to send to the DB.

PNG files in this repository show how the database and its tables need to be set up beforehand.

About

Workings on pushing data from Excel/CSVs to a database using Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages