Advertisement
Guest User

bug maligno

a guest
Jan 21st, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.13 KB | None | 0 0
  1. import pandas as pd
  2. from sqlalchemy import creat_engine
  3. df='alunos.csv'
  4. df.columns=[c.lower() for c in df.columns]
  5. print("alguns campos\n----")
  6. print pd.read(df,nrows=5)
  7. table=create_engine('postgresql://postgres:9104m4th3u5@localhost:5432/escola    ')
  8. df.to_sql("alunos",table)
  9.  
  10.  
  11. ~                                                                              
  12. ~                                                                              
  13. ~                                                                              
  14. ~                                                                              
  15. ~                                                                              
  16. ~                                                                              
  17. ~                                                                              
  18. ~                                                                              
  19. ~                                                                              
  20. ~                                                                              
  21. ~                                                                              
  22. ~                                                                              
  23. ~                                                                              
  24. ~                                                                              
  25. ~                                                                              
  26. ~                                                                              
  27. ~                                                                              
  28. ~                                                                              
  29. ~                                                                              
  30. ~                                                                              
  31. ~                                                                              
  32. ~                                                                              
  33. "importador_teste.py" 10L, 277C                               6,17         Tudo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement