read_sql(): Data from SQLite database table to Pandas DataFrame #B06

preview_player
Показать описание
00:00 Introduction
01:14 Colab platform to upload sample Excel file and create DataFrame using read_excel().
02:54 Crate SQLite database with sample student table by using to_sql()
05:30 Create DataFrame by using SQLite database student table data by using read_sql()
08:19 params options to pass parameters to the query while using read_sql()
10:28 Multiple parameters to pass to Query using params option

#read_sql() #DataFrameFunctions #SQLiteToDataFrame #IMportData #SQLite #plus2net #Tutorial

Download all Jupiter file ( .ipynb ) with source code

Copy or download Excel file or sample DataFrame of student table

Copy or read all source codes and answer sample questions from here

More about Colab platform

Upload Excel or CSV file to Colab platform ( mount drive ) and use with Pandas

Course Details

Рекомендации по теме
Комментарии
Автор

Thanks, very good course, i have 3 python files with database and i couldn't make them work together, than make the exe file for the program, i tried auto-py-to-exe but not work i saw many videos but still not clear i hope when you'll have time to make us an example Thank you in advance i hope U accept....

usipgwo
Автор

can you convert this statement so instead of an 'SQLite' database I want a access database 'my_data.accdb'
my_data.accdb

from sqlalchemy import create_engine, text
from sqlalchemy.exc import SQLAlchemyError
path="sqlite:///my_data.db" # create a SQLite database in google colab session storage
my_conn = create_engine(path)
my_conn=my_conn.connect() # connection is established
try:
result = my_conn.execute(text("select name from sqlite_master where type = 'table'"))
for row in result:
print(row) # Display all tables in SQLite database
except SQLAlchemyError as e:
error = str(e.__dict__['orig'])
print(error)

philmillington