Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 529 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 529 Bytes

csv2pgsql

Import CSV to Postgresql using Pandas

Requirements

  • Python 2.7
  • Pandas
  • sqlalchemy

Arguments

--connection, -c: Postgresql database connection string, i.e. postgresql://user:pass@localhost/db_name
--file, -f: path to csv file, i.e. /Users/myusername/Documents/input.csv
--table, -t: name of table to create in database, i.e. shipping

Usage

python csv2pgsql.py -f /Users/fitzpaddy/Documents/data/input.csv -s logistics  -t shipping -c postgresql://user:pass@localhost/accounts