Check out example codes for "sql from jupyter notebooks". It will help you in understanding the concepts better.

Code Example 1

# import packages
import pandas as pd
import sqlite3 

# connect database and create cursor
conn = sqlite3.connect('data.sqlite')
cur = conn.cursor()

# executing the query
cur.execute("""SELECT * FROM employees LIMIT 5;""")

# creating a dataframe object
df = pd.DataFrame(cur.fetchall())

# find database attributes from cursor.description to use as column names

# creating dataframe columns
df.columns = [x[0] for x in cur.description]

Learn ReactJs, React Native from