Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Last active January 27, 2018 16:55
Show Gist options
  • Save sergiolucero/e7f48be38bbcc871c6636f2e8e96a678 to your computer and use it in GitHub Desktop.
Save sergiolucero/e7f48be38bbcc871c6636f2e8e96a678 to your computer and use it in GitHub Desktop.
show sqlite3 tables in python
import sqlite3
import pandas as pd
db = sqlite3.connect('database.db')
tables = pd.read_sql_query("SELECT * FROM sqlite_master WHERE type='table'", db)
print(tables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment