Guest User

Untitled

a guest
Nov 22nd, 2018
138
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_excel('calllists01.xlsx', sheet_name='Sheet1')
  5. username = ''
  6. password = ''
  7. dsn='postgresql://{}:{}@warehouse:5432/warehouse'.format(username, password)
  8. db_warehouse = create_engine(dsn)
  9. df.to_sql('customers', con=db_warehouse)
Add Comment
Please, Sign In to add comment