반응형
250x250
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Jenkins
- openlens
- Spring
- COALESCE
- IntelliJ
- redis
- aws cicd
- Kafka
- codedeploy error
- bootstrap
- codedeploy
- JavaScript
- VPN
- Python
- PostgreSQL
- 도커
- chartjs
- node
- java bigdecimal
- kubeflow
- codebuild
- AWS CI/CD 구축하기
- docker
- SQL
- aws
- codepipeline
- Flux
- chart.js
- Airflow
- Spring Error
Archives
- Today
- Total
목록create_engine (1)
Small Asteroid Blog
[python] dataframe db에 저장
import pandas as pd import pymysql pymysql.install_as_MySQLdb() pd_data = pd.DataFrame(resultlist) print(pd_data) engine = create_engine('mysql://root:'+'password'+'@localhost/db_name',encoding='utf-8') pd_data.to_sql('table_name',engine,if_exists='replace',index=False, index_label=None, chunksize=500) print('ok') 'if_exists' 옵션에는 {'fail', 'replace', 'append'}의 3개가 존재하고, 디폴트는 'fail' 옵션입니다. if_ex..
백엔드/Python
2020. 10. 7. 14:40