Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coding: iso8859-1
- import pandas as pd
- from sqlalchemy import create_engine
- import string
- import re
- import psycopg2
- df=pd.read_csv('alunos.csv',enconding='iso-8859-1')
- df.columns=[c.lower() for c in df.columns]
- print("criar tabelas\n...")
- engine=create_engine('postgresql://postgres:r00t@localhost:5432/escola2')
- df.to_sql("students",con=engine,index=False)
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- ~
- "impotador_master.py" 15L, 442C 1,1 Tudo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement