Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- from sqlalchemy import create_engine
- df = pd.read_excel('calllists01.xlsx', sheet_name='Sheet1')
- username = ''
- password = ''
- dsn='postgresql://{}:{}@warehouse:5432/warehouse'.format(username, password)
- db_warehouse = create_engine(dsn)
- df.to_sql('customers', con=db_warehouse)
Add Comment
Please, Sign In to add comment