Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv, sqlite3
- import pandas as pd
- import numpy as np
- con = sqlite3.connect("exercise_database.db")
- query_one = pd.read_sql_query("SELECT iso, AVG(score) AS averageScore FROM reviews GROUP BY iso", con)
- print(query_one)
- query_two = pd.read_sql_query("SELECT app_bought_bucket, MAX(score) AS maxScore FROM reviews GROUP BY app_bought_bucket", con)
- print(query_two)
- query_three = pd.read_sql_query("SELECT date, AVG(score) AS averageScore FROM reviews GROUP BY date", con)
- print(query_three)
- con.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement