Spaces:
Sleeping
Sleeping
Victor Rivera commited on
Commit ·
e71effe
1
Parent(s): 372abc5
DataPath de HuggingFace
Browse files123456122 unmodified lines129130131131132133134135136137138139140132133134135136137138139140141142143144145146147import sqlite3import pandas as pdfrom datasets import load_dataset
def create_connection(): """ Create a database connection to the SQLite database """122 unmodified lines
# Data import paths data_paths = { "customers": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/customers.csv", "staffs": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/staffs.csv", "products": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/products.csv", "categories": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/categories.csv", "stores": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/stores.csv", "brands": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/brands.csv", "stocks": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/stocks.csv", "orders": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/orders.csv", "order_items": "https://huggingface.co/spaces/VicGerardoPR/InteractiveDatabseApp/blob/mainCSV/order_items.csv", } "customers": "CSV/customers.csv", "staffs": "CSV/staffs.csv", "products": "CSV/products.csv", "categories": "CSV/categories.csv", "stores": "CSV/stores.csv", "brands": "CSV/brands.csv", "stocks": "CSV/stocks.csv", "orders": "CSV/orders.csv", "order_items": "CSV/order_items.csv", } dataset = load_dataset('VicGerardoPR/InteractiveDatabseApp', data_files=data_paths)
# Import data to tables for table_name, csv_path in data_paths.items():dataBaseSetup.py+14-10