<jupyter_start><jupyter_text>Extracting data from relational databases  SQLite Databases  import packages<jupyter_code># import sql lite
import sqlite3
# create a connection
connection = sqlite3.connect("classroomDB.db")
connection.close()<jupyter_output><empty_output><jupyter_text>create table<jupyter_code># open
connection = sqlite3.connect("classroomDB.db")
# cursor
cursor = connection.cursor()
# query
create_table = """
    CREATE TABLE classroom (
                    student_id INTEGER PRIMARY KEY,
                    name VARCHAR(20),
                    gender CHAR(1),
                    physics_marks INTEGER,
                    chemistry_marks INTEGER,
                    mathematics_marks INTEGER
                    );
"""
# execute query
cursor.execute(create_table)
# commit changes
connection.commit()
# close
connection.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08503401360544217, 'fraction_numerical': 0.006802721088435374, 'mean_word_length': 2.9596412556053813, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '155849', 'license': 'MIT', 'n_tokens_mistral': 259, 'n_tokens_neox': 235, 'n_words': 54, 'path': 'notebooks/Extract data.ipynb', 'repo_name': 'RaduMihut/titanic', 'size': '882'}