Skip to content

Instantly share code, notes, and snippets.

@pAulseperformance
Created September 21, 2018 10:58
Show Gist options
  • Save pAulseperformance/17daf4383bd15fb78964685645c149a2 to your computer and use it in GitHub Desktop.
Save pAulseperformance/17daf4383bd15fb78964685645c149a2 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