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_csv('Zama22.csv')
- username = 'marcel'
- password = '*'
- dsn='postgresql://{}:{}@197.189.235.66:5432/warehouse'.format(username, password)
- db_warehouse = create_engine(dsn)
- table_name = 'zama_22'
- df.to_sql(table_name, con=db_warehouse)
Add Comment
Please, Sign In to add comment