Creating a database engine in Python

Nhập dữ liệu vào Python: Giới thiệu

Hugo Bowne-Anderson

Data Scientist at DataCamp

Creating a database engine

  • SQLite database
    • Fast and simple
  • SQLAlchemy
    • Works with many Relational Database Management Systems
from sqlalchemy import create_engine
engine = create_engine('sqlite:///Northwind.sqlite')
Nhập dữ liệu vào Python: Giới thiệu

Getting table names

from sqlalchemy import create_engine
engine = create_engine('sqlite:///Northwind.sqlite')
table_names = engine.table_names()
print(table_names)
['Categories', 'Customers', 'EmployeeTerritories',
'Employees', 'Order Details', 'Orders', 'Products',
'Region', 'Shippers', 'Suppliers', 'Territories']
Nhập dữ liệu vào Python: Giới thiệu

Let's practice!

Nhập dữ liệu vào Python: Giới thiệu

Preparing Video For Download...