Skip to content

Instantly share code, notes, and snippets.

@AI-MOO
Last active October 17, 2021 04:03
Show Gist options
  • Save AI-MOO/8e3c2693ff34a269ac0224f0fc6293dd to your computer and use it in GitHub Desktop.
Save AI-MOO/8e3c2693ff34a269ac0224f0fc6293dd to your computer and use it in GitHub Desktop.
# SQL Data Imports
import sqlite3 as sq3
import pandas as pd
path = 'data/sample.db' # SQLite db مسار ملف قاعدة البيانات
con = sq3.Connection(path) # تهيئة اتصال مع قاعدة البيانات
query = ''' SELECT * FROM 'Employee'; ''' # SQL استعلام
data = pd.read_sql(query, con) # pandas تنفيذ الاستعلام من خلال مكتبة
data.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment