IT 인프라의 구성 요소
파이참으로 오라클 DB 연동해서 HTML 저장
파이참을 실행하여 'Setting'에 들어가보자.



import pandas as pd
import cx_Oracle as cx
conn = cx.connect("hr", "hr", "localhost:1521/xe")
cursor = conn.cursor()
query ='select * from jobs'
df = pd.read_sql(query, con=conn)
print(df)
html = df.to_html()
text_file = open("index.html", "w")
text_file.write(html)
text_file.close()

데이터 임포트를 이용해 엑셀 파일로 테이블 만들기







'메가존 클라우드 2기 교육 > Python, Go lang' 카테고리의 다른 글
GoLang - VSCode 개발환경 설치 (0) | 2023.03.24 |
---|---|
Python - AWS (0) | 2023.03.23 |
Python - Oracle DB연동 (0) | 2023.03.22 |
Python - PyCharm(파이참), Anaconda(아나콘다) (0) | 2023.03.21 |
Python - Colab, 코드 실습 (0) | 2023.03.16 |