반응형
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 | 29 | 30 | 31 |
Tags
- PostgreSQL
- c#
- numpy
- PySpark
- Redshift
- PANDAS
- Google Excel
- Mac
- Tkinter
- Apache
- matplotlib
- Excel
- gas
- hive
- google apps script
- Java
- Python
- Kotlin
- Github
- string
- dataframe
- SQL
- math
- array
- django
- GIT
- Google Spreadsheet
- 파이썬
- list
Archives
- Today
- Total
목록pandas db upload (1)
달나라 노트
Python Pandas : pandas.io.sql.get_schema (DataFrame 내용을 sql create table syntax로 만들기)
Pandas로 DataFrame을 다루다보면 DataFrame data를 database에 load해야 할 경우가 있습니다. 따라서 아래처럼 create table 구문을 실행시켜 database table을 생성하고 해당 tabe에 insert하는 방법을 사용한다고 가정해봅시다. create table test_table ( col1 varchar, col2 bigint, col3 double ) 위 예시는 column이 3개밖에 없어서 다행이지만 만약 column이 30개인 DataFrame을 insert하려고 한다면 위 create table syntax에 column 30개에 대한 datatype을 일일이 적어줘야 할것입니다. 이는 너무 번거로운 작업이 아닐 수 없죠. pandas에는 위처럼 특정..
Python/Python Pandas
2021. 6. 13. 14:33