Skip to content

Instantly share code, notes, and snippets.

@kaigouthro
Forked from pAulseperformance/makedatabase.py
Created June 15, 2023 18:00
Show Gist options
  • Save kaigouthro/9106160ddcd1d5c3379e9122188200b4 to your computer and use it in GitHub Desktop.
Save kaigouthro/9106160ddcd1d5c3379e9122188200b4 to your computer and use it in GitHub Desktop.
import pandas as pd
import sqlite3
conn = sqlite3.connect('/path/to/where/you/want/to/store/your/db')
c = conn.cursor()
df = pd.DataFrame([{'Column1':'Data','Column2':'Base'}])
df.to_sql("SQLDatabase", conn, if_exists="replace")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment