# 8.6:  DataFrame from SQL.  Query the revenue table in ../testdb.db, passing the database
# connection object and the query below in the pd.read_sql() function.  Print the DataFrame.

import pandas as pd
import sqlite3

db_fname = '../testdb.db'

query = 'SELECT * FROM revenue'

# database connection object
conn = sqlite3.connect(db_fname)

df = pd.read_sql(query, conn)

print(df)

