SQLite3로 Database 공부 시작!
데이터베이스를 쓰러면 SQL을 써야하는데, 그 중 가장 쉽고 간단한 녀석이 SQLite라 할 수 있겠다. 다른 SQL과 달리 서버레벨이 아니라 db확장자 파일에 데이터를 쓰는 점이 일단 쉽다. # jupyter notebook import sqlite3 from datetime import datetime now = datetime.now().strftime('%Y%m%d_%H%M%S') table_name = f'Data_{now}' con = sqlite3.connect('test.db') cursor = con.cursor() # 테이블 생성 cursor.execute(f'CREATE TABLE {table_name} (Well text, Class text);') # 데이터 삽입 into 테이블 ..
2022.11.30