Last active
July 7, 2020 12:07
-
-
Save maxcraftsman/6c9eee873598e1fddab228192f14d505 to your computer and use it in GitHub Desktop.
Save pandas to sqlite [dirty]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import sqlalchemy as sa | |
e = sa.create_engine(r'sqlite:////path/to/file/database.db', echo=True) # LINUX | |
e = sa.create_engine(r'sqlite:///C:\\path\\to\\database.db', echo=True) # WINDOWS | |
df.to_sql("deskykt", e, if_exists="append", index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment