Guest User

Untitled

a guest
Nov 22nd, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import pandas as pd
  2. import numpy as np
  3. from sqlalchemy import create_engine
  4. df = pd.read_csv('Zama22.csv')
  5. username = 'marcel'
  6. password = '*'
  7. dsn='postgresql://{}:{}@197.189.235.66:5432/warehouse'.format(username, password)
  8. db_warehouse = create_engine(dsn)
  9. table_name = 'zama_22'
  10. df.to_sql(table_name, con=db_warehouse)
Add Comment
Please, Sign In to add comment