How do you import an SQLite3 database file you have stored on your computer into Python Jupyter Notebook?
My goal is to be able to analyze the data in Python Pandas the same way I do when I import CSV files.
import sqlite3
import pandas as pd
# Create the connection
cnx = sqlite3.connect(r'C:\mydatabases\bigdata.db')
# create the dataframe from a query
df = pd.read_sql_query("SELECT * FROM userdata", cnx)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With