from sqlviz.utils import *
from sqlviz.sql import *
from sqlviz.parser import *
conn = Conn(CREDS)
query = "select count(*) as records from pageviews"
sql = Sql(conn, query)
sql.run()
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
</style>
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
records | |
---|---|
0 | 860385 |
Conn (creds:dict)
A wrapper around a psycopg2 connection.
Sql (conn:sqlviz.sql.Conn, query:str)
A query plus a db connection.