Updated: 18 December 2023

Key bindings

Command Palette Ctrl + Shift + c
Run a cell Ctrl + Enter
Run cell and advance to next Shift + Enter
Insert cell above A
Insert cell below B
Change cell type to code y
Change cell type to markdown m
Edit a cell Enter
Save notebook Ctrl + S
Delete cell dd



docker run -it --rm -p 8888:8888 -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:2023-08-19


Query MySQL database from a Jupyter notebook. Minimal working example:

Cell one

! pip install sqlalchemy
! pip install pandas
! pip install mysql-connector-python

Cell two

import sqlalchemy
import pandas as pd

url = 'mysql+mysqlconnector://the_usr:somepass@'
engine = sqlalchemy.create_engine(url)

sql = '''
    SELECT * FROM clients;

from sqlalchemy.sql import text

with engine.connect() as conn:
    query = conn.execute(text(sql))         
df = pd.DataFrame(query.fetchall())


Leave a comment