인구조사 사례 연구

Python으로 배우는 데이터베이스 입문

Jason Myers

Co-Author of Essential SQLAlchemy and Software Engineer

인구조사 사례 연구

  • SQLAlchemy와 데이터베이스 준비
  • 데이터베이스로 데이터 적재
  • 쿼리로 데이터 과학 문제 해결
Python으로 배우는 데이터베이스 입문

파트 1: SQLAlchemy와 데이터베이스 준비

  • 엔진과 MetaData 객체 생성
from sqlalchemy import create_engine, MetaData
engine = create_engine('sqlite:///census_nyc.sqlite')
metadata = MetaData()
Python으로 배우는 데이터베이스 입문

파트 1: SQLAlchemy와 데이터베이스 준비

  • 인구조사 테이블 생성 및 저장
from sqlalchemy import (Table, Column, String, 
       Integer, Decimal, Boolean)

employees = Table('employees', metadata, Column('id', Integer()), Column('name', String(255)), Column('salary', Decimal()), Column('active', Boolean()))
metadata.create_all(engine)
Python으로 배우는 데이터베이스 입문

연습해 봅시다!

Python으로 배우는 데이터베이스 입문

Preparing Video For Download...