Skip to content
Snippets Groups Projects
Commit 30e1fc10 authored by Michael Bücker's avatar Michael Bücker
Browse files

Return tables names as list

parent ea9265a5
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,10 @@ class Database:
def __getattr__(self, table_name):
return pd.read_sql_table(table_name, self.conn)
def list_tables(self):
table_names = self.conn.table_names()
return table_names
def db_connect(db_name):
hostname=os.getenv("DB_HOST")
user=os.getenv("DB_USER")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment